Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
openairinterface5G
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
27
Merge Requests
27
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
oai
openairinterface5G
Commits
8f6746be
Commit
8f6746be
authored
Dec 12, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop1B_integration_w49' into 'develop'
Develop1 b integration w49 See merge request
!56
parents
bf5bf8ba
17aefade
Changes
104
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
104 changed files
with
3314 additions
and
786 deletions
+3314
-786
.gitlab-ci.yml
.gitlab-ci.yml
+2
-1
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
openair1/PHY/CODING/lte_segmentation.c
openair1/PHY/CODING/lte_segmentation.c
+1
-1
openair1/PHY/INIT/defs.h
openair1/PHY/INIT/defs.h
+12
-0
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+80
-1
openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
+8
-7
openair1/PHY/LTE_TRANSPORT/dci.c
openair1/PHY/LTE_TRANSPORT/dci.c
+5
-5
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+116
-14
openair1/PHY/LTE_TRANSPORT/defs.h
openair1/PHY/LTE_TRANSPORT/defs.h
+9
-0
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
+20
-3
openair1/PHY/LTE_TRANSPORT/group_hopping.c
openair1/PHY/LTE_TRANSPORT/group_hopping.c
+6
-0
openair1/PHY/LTE_TRANSPORT/initial_sync.c
openair1/PHY/LTE_TRANSPORT/initial_sync.c
+7
-0
openair1/PHY/LTE_TRANSPORT/phich.c
openair1/PHY/LTE_TRANSPORT/phich.c
+48
-8
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+17
-0
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+66
-48
openair1/PHY/LTE_TRANSPORT/srs_modulation.c
openair1/PHY/LTE_TRANSPORT/srs_modulation.c
+29
-41
openair1/PHY/LTE_TRANSPORT/uci_tools.c
openair1/PHY/LTE_TRANSPORT/uci_tools.c
+2
-0
openair1/PHY/LTE_TRANSPORT/ulsch_coding.c
openair1/PHY/LTE_TRANSPORT/ulsch_coding.c
+17
-0
openair1/PHY/LTE_TRANSPORT/ulsch_modulation.c
openair1/PHY/LTE_TRANSPORT/ulsch_modulation.c
+3
-2
openair1/PHY/defs.h
openair1/PHY/defs.h
+1
-1
openair1/PHY/extern.h
openair1/PHY/extern.h
+12
-0
openair1/PHY/impl_defs_lte.h
openair1/PHY/impl_defs_lte.h
+20
-5
openair1/SCHED/Makefile.inc
openair1/SCHED/Makefile.inc
+1
-0
openair1/SCHED/defs.h
openair1/SCHED/defs.h
+13
-0
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+633
-26
openair1/SCHED/pucch_pc.c
openair1/SCHED/pucch_pc.c
+2
-2
openair1/SCHED/srs_pc.c
openair1/SCHED/srs_pc.c
+100
-0
openair2/COMMON/as_message.h
openair2/COMMON/as_message.h
+8
-0
openair2/COMMON/rrc_messages_def.h
openair2/COMMON/rrc_messages_def.h
+1
-0
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+2
-0
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+38
-5
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+39
-9
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_bch.c
openair2/LAYER2/MAC/eNB_scheduler_bch.c
+1
-0
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_mch.c
openair2/LAYER2/MAC/eNB_scheduler_mch.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+1
-1
openair2/LAYER2/MAC/extern.h
openair2/LAYER2/MAC/extern.h
+2
-0
openair2/LAYER2/MAC/main.c
openair2/LAYER2/MAC/main.c
+1
-0
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+4
-20
openair2/LAYER2/MAC/ra_procedures.c
openair2/LAYER2/MAC/ra_procedures.c
+9
-4
openair2/LAYER2/MAC/rar_tools.c
openair2/LAYER2/MAC/rar_tools.c
+1
-1
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+831
-369
openair2/LAYER2/MAC/vars.h
openair2/LAYER2/MAC/vars.h
+9
-0
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+46
-4
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
openair2/LAYER2/PDCP_v10.1.0/pdcp.h
+16
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+19
-4
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.c
+9
-5
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am.h
+8
-4
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.c
+3
-2
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_init.h
+3
-1
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_receiver.c
+2
-1
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c
openair2/LAYER2/RLC/AM_v9.3.0/rlc_am_test.c
+2
-2
openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c
openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.c
+7
-4
openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h
openair2/LAYER2/RLC/TM_v9.3.0/rlc_tm_init.h
+7
-3
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
+16
-2
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.h
+1
-1
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.c
+11
-7
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_control_primitives.h
+10
-4
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.c
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um_test.c
+14
-14
openair2/LAYER2/RLC/rlc.h
openair2/LAYER2/RLC/rlc.h
+12
-1
openair2/LAYER2/RLC/rlc_mac.c
openair2/LAYER2/RLC/rlc_mac.c
+5
-26
openair2/LAYER2/RLC/rlc_rrc.c
openair2/LAYER2/RLC/rlc_rrc.c
+71
-28
openair2/NETWORK_DRIVER/UE_IP/common.c
openair2/NETWORK_DRIVER/UE_IP/common.c
+3
-2
openair2/PHY_INTERFACE/defs.h
openair2/PHY_INTERFACE/defs.h
+3
-0
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+38
-15
openair2/RRC/LITE/MESSAGES/asn1_msg.h
openair2/RRC/LITE/MESSAGES/asn1_msg.h
+2
-0
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+2
-1
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+332
-19
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+6
-5
openair2/UTIL/LOG/vcd_signal_dumper.c
openair2/UTIL/LOG/vcd_signal_dumper.c
+4
-0
openair2/UTIL/LOG/vcd_signal_dumper.h
openair2/UTIL/LOG/vcd_signal_dumper.h
+4
-0
openair2/UTIL/OPT/opt.h
openair2/UTIL/OPT/opt.h
+1
-1
openair2/UTIL/OPT/probe.c
openair2/UTIL/OPT/probe.c
+7
-7
openair3/NAS/COMMON/API/NETWORK/l2_message.h
openair3/NAS/COMMON/API/NETWORK/l2_message.h
+8
-0
openair3/NAS/COMMON/EMM/MSG/AttachAccept.c
openair3/NAS/COMMON/EMM/MSG/AttachAccept.c
+2
-1
openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.c
openair3/NAS/COMMON/EMM/MSG/AuthenticationRequest.c
+1
-1
openair3/NAS/COMMON/EMM/MSG/SecurityModeCommand.c
openair3/NAS/COMMON/EMM/MSG/SecurityModeCommand.c
+2
-0
openair3/NAS/COMMON/EMM/MSG/SecurityModeComplete.c
openair3/NAS/COMMON/EMM/MSG/SecurityModeComplete.c
+4
-1
openair3/NAS/COMMON/IES/EmergencyNumberList.c
openair3/NAS/COMMON/IES/EmergencyNumberList.c
+42
-12
openair3/NAS/COMMON/IES/EmergencyNumberList.h
openair3/NAS/COMMON/IES/EmergencyNumberList.h
+8
-2
openair3/NAS/COMMON/IES/MobileIdentity.c
openair3/NAS/COMMON/IES/MobileIdentity.c
+10
-5
openair3/NAS/COMMON/IES/MobileIdentity.h
openair3/NAS/COMMON/IES/MobileIdentity.h
+56
-1
openair3/NAS/TOOLS/usim_data.c
openair3/NAS/TOOLS/usim_data.c
+1
-0
openair3/NAS/UE/API/USIM/usim_api.c
openair3/NAS/UE/API/USIM/usim_api.c
+192
-1
openair3/NAS/UE/API/USIM/usim_api.h
openair3/NAS/UE/API/USIM/usim_api.h
+5
-0
openair3/NAS/UE/EMM/Authentication.c
openair3/NAS/UE/EMM/Authentication.c
+10
-1
openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c
openair3/NAS/UE/EMM/SAP/EmmDeregisteredNormalService.c
+9
-1
openair3/NAS/UE/EMM/SAP/emm_asDef.h
openair3/NAS/UE/EMM/SAP/emm_asDef.h
+1
-0
openair3/NAS/UE/EMM/SAP/emm_recv.c
openair3/NAS/UE/EMM/SAP/emm_recv.c
+12
-3
openair3/NAS/UE/EMM/SAP/emm_send.c
openair3/NAS/UE/EMM/SAP/emm_send.c
+28
-0
openair3/NAS/UE/EMM/SecurityModeControl.c
openair3/NAS/UE/EMM/SecurityModeControl.c
+9
-2
openair3/NAS/UE/EMM/emm_main.c
openair3/NAS/UE/EMM/emm_main.c
+4
-1
openair3/NAS/UE/EMM/emm_proc.h
openair3/NAS/UE/EMM/emm_proc.h
+1
-1
openair3/NAS/UE/UEprocess.c
openair3/NAS/UE/UEprocess.c
+2
-0
openair3/NAS/UE/nas_itti_messaging.c
openair3/NAS/UE/nas_itti_messaging.c
+33
-0
openair3/NAS/UE/nas_itti_messaging.h
openair3/NAS/UE/nas_itti_messaging.h
+3
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.generic.oaisim.local_no_mme.conf
...E-EPC/CONF/enb.band7.tm1.generic.oaisim.local_no_mme.conf
+5
-5
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+7
-0
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+7
-2
targets/SIMU/USER/oaisim.c
targets/SIMU/USER/oaisim.c
+2
-0
targets/SIMU/USER/oaisim_functions.c
targets/SIMU/USER/oaisim_functions.c
+2
-2
targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c
+2
-2
No files found.
.gitlab-ci.yml
View file @
8f6746be
...
...
@@ -34,4 +34,5 @@ job1:
-
sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
-
sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR
-
cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml
when
:
manual
only
:
-
triggers
cmake_targets/CMakeLists.txt
View file @
8f6746be
...
...
@@ -1020,6 +1020,7 @@ set(SCHED_SRC
${
OPENAIR1_DIR
}
/SCHED/phy_mac_stub.c
${
OPENAIR1_DIR
}
/SCHED/pucch_pc.c
${
OPENAIR1_DIR
}
/SCHED/pusch_pc.c
${
OPENAIR1_DIR
}
/SCHED/srs_pc.c
)
add_library
(
SCHED_LIB
${
SCHED_SRC
}
)
...
...
openair1/PHY/CODING/lte_segmentation.c
View file @
8f6746be
...
...
@@ -60,7 +60,7 @@ int lte_segmentation(unsigned char *input_buffer,
}
if
((
*
C
)
>
MAX_NUM_DLSCH_SEGMENTS
)
{
msg
(
"lte_segmentation.c: too many segments %d
\n
"
,
*
C
);
LOG_E
(
PHY
,
"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d
\n
"
,
*
C
,
B
,
L
,
Bprime
);
return
(
-
1
);
}
...
...
openair1/PHY/INIT/defs.h
View file @
8f6746be
...
...
@@ -206,7 +206,19 @@ void phy_config_dedicated_ue(module_id_t Mod_id,
uint8_t
CH_index
,
struct
PhysicalConfigDedicated
*
physicalConfigDedicated
);
/*!
\fn void phy_config_harq_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t CH_index,
uint16_t max_harq_tx)
\brief Configure UE UL max harq Tx.
\details Invoked upon reception of RRCConnectionSetup or RRCConnectionReconfiguration from eNB.
@param Mod_id Instance ID for eNB
@param CC_id Component Carrier index
@param CH_index Index of eNB for this configuration
@param max_harq_tx max harq tx information
*/
void
phy_config_harq_ue
(
module_id_t
Mod_id
,
int
CC_id
,
uint8_t
CH_index
,
uint16_t
max_harq_tx
);
/**
\brief Configure UE MBSFN common parameters.
\details Invoked upon reception of SIB13 from eNB.
...
...
openair1/PHY/INIT/lte_init.c
View file @
8f6746be
...
...
@@ -482,6 +482,26 @@ void phy_config_dedicated_eNB_step2(PHY_VARS_eNB *eNB)
}
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
)
{
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
present
==
SoundingRS_UL_ConfigDedicated_PR_setup
)
{
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
duration
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
duration
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
cyclicShift
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
cyclicShift
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
freqDomainPosition
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
freqDomainPosition
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_Bandwidth
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_Bandwidth
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_ConfigIndex
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_HoppingBandwidth
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_HoppingBandwidth
;
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
transmissionComb
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
;
LOG_D
(
PHY
,
"soundingrs_ul_config_dedicated.srs_ConfigIndex %d
\n
"
,
eNB
->
soundingrs_ul_config_dedicated
[
UE_id
].
srs_ConfigIndex
);
}
LOG_D
(
PHY
,
"------------------------------------------------------------
\n
"
);
}
eNB
->
physicalConfigDedicated
[
UE_id
]
=
NULL
;
}
}
...
...
@@ -726,6 +746,14 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
}
#endif
void
phy_config_harq_ue
(
uint8_t
Mod_id
,
int
CC_id
,
uint8_t
eNB_id
,
uint16_t
max_harq_tx
)
{
PHY_VARS_UE
*
phy_vars_ue
=
PHY_vars_UE_g
[
Mod_id
][
CC_id
];
phy_vars_ue
->
ulsch
[
eNB_id
]
->
Mlimit
=
max_harq_tx
;
}
void
phy_config_dedicated_ue
(
uint8_t
Mod_id
,
int
CC_id
,
uint8_t
eNB_id
,
struct
PhysicalConfigDedicated
*
physicalConfigDedicated
)
{
...
...
@@ -742,7 +770,8 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
phy_vars_ue
->
dlsch_received_last
[
eNB_id
]
=
0
;
phy_vars_ue
->
dlsch_fer
[
eNB_id
]
=
0
;
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
ri_ConfigIndex
=
-
1
;
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
cqi_PMI_ConfigIndex
=
-
1
;
if
(
physicalConfigDedicated
)
{
LOG_D
(
PHY
,
"[UE %d] Received physicalConfigDedicated from eNB %d
\n
"
,
Mod_id
,
eNB_id
);
...
...
@@ -852,6 +881,53 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
}
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
)
{
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srsConfigDedicatedSetup
=
0
;
if
(
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
present
==
SoundingRS_UL_ConfigDedicated_PR_setup
)
{
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srsConfigDedicatedSetup
=
1
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
duration
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
duration
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
cyclicShift
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
cyclicShift
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
freqDomainPosition
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
freqDomainPosition
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_Bandwidth
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_Bandwidth
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_ConfigIndex
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_HoppingBandwidth
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_HoppingBandwidth
;
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
transmissionComb
=
physicalConfigDedicated
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
;
LOG_D
(
PHY
,
"soundingrs_ul_config_dedicated.srs_ConfigIndex %d
\n
"
,
phy_vars_ue
->
soundingrs_ul_config_dedicated
[
eNB_id
].
srs_ConfigIndex
);
}
LOG_D
(
PHY
,
"------------------------------------------------------------
\n
"
);
}
if
(
physicalConfigDedicated
->
cqi_ReportConfig
)
{
if
(
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
)
{
// configure PUSCH CQI reporting
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
cqi_ReportModeAperiodic
=
*
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
;
if
((
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
cqi_ReportModeAperiodic
!=
rm12
)
&&
(
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
cqi_ReportModeAperiodic
!=
rm30
)
&&
(
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
cqi_ReportModeAperiodic
!=
rm31
))
LOG_E
(
PHY
,
"Unsupported Aperiodic CQI Feedback Mode : %d
\n
"
,
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
cqi_ReportModeAperiodic
);
}
if
(
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportPeriodic
)
{
if
(
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportPeriodic
->
present
==
CQI_ReportPeriodic_PR_setup
)
{
// configure PUCCH CQI reporting
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
cqi_PUCCH_ResourceIndex
=
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportPeriodic
->
choice
.
setup
.
cqi_PUCCH_ResourceIndex
;
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
cqi_PMI_ConfigIndex
=
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportPeriodic
->
choice
.
setup
.
cqi_pmi_ConfigIndex
;
if
(
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportPeriodic
->
choice
.
setup
.
ri_ConfigIndex
)
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
ri_ConfigIndex
=
*
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportPeriodic
->
choice
.
setup
.
ri_ConfigIndex
;
}
else
if
(
physicalConfigDedicated
->
cqi_ReportConfig
->
cqi_ReportPeriodic
->
present
==
CQI_ReportPeriodic_PR_release
)
{
// handle release
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
ri_ConfigIndex
=
-
1
;
phy_vars_ue
->
cqi_report_config
[
eNB_id
].
CQI_ReportPeriodic
.
cqi_PMI_ConfigIndex
=
-
1
;
}
}
}
#ifdef CBA
if
(
physicalConfigDedicated
->
pusch_CBAConfigDedicated_vlola
)
{
...
...
@@ -868,6 +944,9 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
return
;
}
// fill cqi parameters for periodic CQI reporting
get_cqipmiri_params
(
phy_vars_ue
,
eNB_id
);
}
void
phy_config_cba_rnti
(
module_id_t
Mod_id
,
int
CC_id
,
eNB_flag_t
eNB_flag
,
uint8_t
index
,
rnti_t
cba_rnti
,
uint8_t
cba_group_id
,
uint8_t
num_active_cba_groups
)
...
...
openair1/PHY/LTE_ESTIMATION/lte_est_freq_offset.c
View file @
8f6746be
...
...
@@ -102,7 +102,7 @@ int lte_est_freq_offset(int **dl_ch_estimates,
{
int
ch_offset
,
omega
,
dl_ch_shift
;
struct
complex16
*
omega_cpx
;
struct
complex16
omega_cpx
;
double
phase_offset
;
int
freq_offset_est
;
unsigned
char
aa
;
...
...
@@ -142,9 +142,8 @@ int lte_est_freq_offset(int **dl_ch_estimates,
// printf("Computing freq_offset\n");
omega
=
dot_product
(
dl_ch
,
dl_ch_prev
,(
frame_parms
->
N_RB_DL
/
2
-
1
)
*
12
,
dl_ch_shift
);
//omega = dot_product(dl_ch,dl_ch_prev,frame_parms->ofdm_symbol_size,15);
omega_cpx
=
(
struct
complex16
*
)
&
omega
;
// printf("omega (%d,%d)\n",omega_cpx->r,omega_cpx->i);
omega_cpx
.
r
=
((
struct
complex16
*
)
&
omega
)
->
r
;
omega_cpx
.
i
=
((
struct
complex16
*
)
&
omega
)
->
i
;
dl_ch
=
(
int16_t
*
)
&
dl_ch_estimates
[
aa
][(((
frame_parms
->
N_RB_DL
/
2
)
+
1
)
*
12
)
+
ch_offset
];
...
...
@@ -155,10 +154,12 @@ int lte_est_freq_offset(int **dl_ch_estimates,
// calculate omega = angle(conj(dl_ch)*dl_ch_prev))
omega
=
dot_product
(
dl_ch
,
dl_ch_prev
,((
frame_parms
->
N_RB_DL
/
2
)
-
1
)
*
12
,
dl_ch_shift
);
omega_cpx
->
r
+=
((
struct
complex16
*
)
&
omega
)
->
r
;
omega_cpx
->
i
+=
((
struct
complex16
*
)
&
omega
)
->
i
;
omega_cpx
.
r
+=
((
struct
complex16
*
)
&
omega
)
->
r
;
omega_cpx
.
i
+=
((
struct
complex16
*
)
&
omega
)
->
i
;
// phase_offset += atan2((double)omega_cpx->i,(double)omega_cpx->r);
phase_offset
+=
atan2
((
double
)
omega_cpx
->
i
,(
double
)
omega_cpx
->
r
);
phase_offset
+=
atan2
((
double
)
omega_cpx
.
i
,(
double
)
omega_cpx
.
r
);
// LOG_I(PHY,"omega (%d,%d) -> %f\n",omega_cpx->r,omega_cpx->i,phase_offset);
}
...
...
openair1/PHY/LTE_TRANSPORT/dci.c
View file @
8f6746be
...
...
@@ -2857,7 +2857,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
}
}
LOG_D
(
PHY
,
"DCI decoding CRNTI [format
_c: %d, nCCE[subframe: %d]: %d ]
\n
"
,
format_c
,
subframe
,
pdcch_vars
[
eNB_id
]
->
nCCE
[
subframe
]
);
LOG_D
(
PHY
,
"DCI decoding CRNTI [format
: %d, nCCE[subframe: %d]: %d ], AggregationLevel %d
\n
"
,
format_c
,
subframe
,
pdcch_vars
[
eNB_id
]
->
nCCE
[
subframe
],
L2
);
// memcpy(&dci_alloc[*dci_cnt].dci_pdu[0],dci_decoded_output,sizeof_bytes);
...
...
@@ -3248,7 +3248,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
SI_RNTI
,
ra_rnti
,
P_RNTI
,
3
,
0
,
format1A
,
format1A
,
format1A
,
...
...
@@ -3277,7 +3277,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
SI_RNTI
,
ra_rnti
,
P_RNTI
,
2
,
1
,
format1A
,
format1A
,
format1A
,
...
...
@@ -3310,7 +3310,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
SI_RNTI
,
ra_rnti
,
P_RNTI
,
1
,
2
,
format1A
,
format1A
,
format1A
,
...
...
@@ -3339,7 +3339,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
SI_RNTI
,
ra_rnti
,
P_RNTI
,
0
,
3
,
format1A
,
format1A
,
format1A
,
...
...
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
8f6746be
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
8f6746be
...
...
@@ -227,6 +227,11 @@ typedef struct {
uint8_t
control_only
;
/// Flag to indicate that this is a calibration ULSCH (i.e. no MAC SDU and filled with TDD calibration information)
// int calibration_flag;
/// Number of soft channel bits
uint32_t
G
;
// decode phich
uint8_t
decode_phich
;
}
LTE_UL_UE_HARQ_t
;
typedef
struct
{
...
...
@@ -333,12 +338,16 @@ typedef struct {
int16_t
Po_PUSCH
;
/// PHR - current power headroom (based on last PUSCH transmission)
int16_t
PHR
;
/// Po_SRS - target output power for SRS
int16_t
Po_SRS
;
/// num active cba group
uint8_t
num_active_cba_groups
;
/// num dci found for cba
uint8_t
num_cba_dci
[
10
];
/// allocated CBA RNTI
uint16_t
cba_rnti
[
4
];
//NUM_MAX_CBA_GROUP];
/// UL max-harq-retransmission
uint8_t
Mlimit
;
}
LTE_UE_ULSCH_t
;
typedef
struct
{
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
View file @
8f6746be
...
...
@@ -249,7 +249,12 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
tc
=
phy_threegpplte_turbo_decoder16
;
}
else
tc
=
phy_threegpplte_turbo_decoder8
;
{
AssertFatal
(
harq_process
->
TBS
>=
256
,
"Mismatch flag nbRB=%d TBS=%d mcs=%d Qm=%d RIV=%d round=%d
\n
"
,
harq_process
->
nb_rb
,
harq_process
->
TBS
,
harq_process
->
mcs
,
harq_process
->
Qm
,
harq_process
->
rvidx
,
harq_process
->
round
);
tc
=
phy_threegpplte_turbo_decoder8
;
}
// nb_rb = dlsch->nb_rb;
...
...
@@ -448,6 +453,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#if 1
if
(
err_flag
==
0
)
{
if
(
llr8_flag
)
{
AssertFatal
(
Kr
>=
256
,
"turbo algo issue Kr=%d cb_cnt=%d C=%d nbRB=%d TBSInput=%d TBSHarq=%d TBSplus24=%d mcs=%d Qm=%d RIV=%d round=%d
\n
"
,
Kr
,
r
,
harq_process
->
C
,
harq_process
->
nb_rb
,
A
,
harq_process
->
TBS
,
harq_process
->
B
,
harq_process
->
mcs
,
harq_process
->
Qm
,
harq_process
->
rvidx
,
harq_process
->
round
);
}
start_meas
(
dlsch_turbo_decoding_stats
);
ret
=
tc
(
&
harq_process
->
d
[
r
][
96
],
...
...
@@ -609,7 +619,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
harq_process
->
errors
[
harq_process
->
round
]
++
;
harq_process
->
round
++
;
// LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
if
(
is_crnti
)
{
LOG_D
(
PHY
,
"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d, TBS %d)
\n
"
,
phy_vars_ue
->
Mod_id
,
subframe
,
harq_pid
,
harq_process
->
round
,
harq_process
->
TBS
);
}
// printf("Rate: [UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
if
(
harq_process
->
round
>=
dlsch
->
Mdlharq
)
{
harq_process
->
status
=
SCH_IDLE
;
...
...
@@ -622,7 +636,10 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
dlsch
->
harq_ack
[
subframe
].
ack
=
1
;
dlsch
->
harq_ack
[
subframe
].
harq_id
=
harq_pid
;
dlsch
->
harq_ack
[
subframe
].
send_harq_status
=
1
;
LOG_D
(
PHY
,
"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d)
\n
"
,
phy_vars_ue
->
Mod_id
,
subframe
,
harq_pid
,
harq_process
->
round
);
if
(
is_crnti
)
{
LOG_D
(
PHY
,
"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)
\n
"
,
phy_vars_ue
->
Mod_id
,
subframe
,
harq_pid
,
harq_process
->
round
,
harq_process
->
TBS
);
}
}
...
...
openair1/PHY/LTE_TRANSPORT/group_hopping.c
View file @
8f6746be
...
...
@@ -42,6 +42,8 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
// This is from Section 5.5.1.3
uint32_t
fss_pusch
=
frame_parms
->
Nid_cell
+
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
groupAssignmentPUSCH
;
uint32_t
fss_pucch
=
frame_parms
->
Nid_cell
;
x2
=
frame_parms
->
Nid_cell
/
30
;
#ifdef DEBUG_GROUPHOP
printf
(
"[PHY] GroupHop:"
);
...
...
@@ -49,7 +51,10 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
for
(
ns
=
0
;
ns
<
20
;
ns
++
)
{
if
(
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
groupHoppingEnabled
==
0
)
{
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
ns
]
=
fss_pusch
%
30
;
frame_parms
->
pucch_config_common
.
grouphop
[
ns
]
=
fss_pucch
%
30
;
}
else
{
if
((
ns
&
3
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
...
...
@@ -57,6 +62,7 @@ void generate_grouphop(LTE_DL_FRAME_PARMS *frame_parms)
}
frame_parms
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
ns
]
=
(((
uint8_t
*
)
&
s
)[
ns
&
3
]
+
fss_pusch
)
%
30
;
frame_parms
->
pucch_config_common
.
grouphop
[
ns
]
=
(((
uint8_t
*
)
&
s
)[
ns
&
3
]
+
fss_pucch
)
%
30
;
}
#ifdef DEBUG_GROUPHOP
...
...
openair1/PHY/LTE_TRANSPORT/initial_sync.c
View file @
8f6746be
...
...
@@ -462,6 +462,13 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
}
}
/* Consider this is a false detection if the offset is > 1000 Hz */
if
(
(
abs
(
ue
->
common_vars
.
freq_offset
)
>
150
)
&&
(
ret
==
0
)
)
{
ret
=-
1
;
LOG_E
(
HW
,
"Ignore MIB with high freq offset [%d Hz] estimation
\n
"
,
ue
->
common_vars
.
freq_offset
);
}
if
(
ret
==
0
)
{
// PBCH found so indicate sync to higher layers and configure frame parameters
//#ifdef DEBUG_INITIAL_SYNCH
...
...
openair1/PHY/LTE_TRANSPORT/phich.c
View file @
8f6746be
...
...
@@ -34,6 +34,10 @@
#include "PHY/extern.h"
#include "SCHED/defs.h"
#include "defs.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/defs.h"
#ifndef USER_MODE
#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
#endif
...
...
@@ -1046,7 +1050,6 @@ void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
// This routine demodulates the PHICH and updates PUSCH/ULSCH parameters
void
rx_phich
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
subframe
,
...
...
@@ -1081,8 +1084,10 @@ void rx_phich(PHY_VARS_UE *ue,
if
(
!
ulsch
)
return
;
LOG_D
(
PHY
,
"[UE %d][PUSCH %d] Frame %d subframe %d PHICH RX Status: %d
\n
"
,
ue
->
Mod_id
,
harq_pid
,
proc
->
frame_rx
,
subframe
,
ulsch
->
harq_processes
[
harq_pid
]
->
status
);
if
(
ulsch
->
harq_processes
[
harq_pid
]
->
status
==
ACTIVE
)
{
LOG_D
(
PHY
,
"[UE %d][PUSCH %d] Frame %d subframe %d PHICH RX ACTIVE
\n
"
,
ue
->
Mod_id
,
harq_pid
,
proc
->
frame_rx
,
subframe
);
LOG_D
(
PHY
,
"[UE %d][PUSCH %d] Frame %d subframe %d PHICH RX ACTIVE
\n
"
,
ue
->
Mod_id
,
harq_pid
,
proc
->
frame_rx
,
subframe
);
Ngroup_PHICH
=
(
frame_parms
->
phich_config_common
.
phich_resource
*
frame_parms
->
N_RB_DL
)
/
48
;
if
(((
frame_parms
->
phich_config_common
.
phich_resource
*
frame_parms
->
N_RB_DL
)
%
48
)
>
0
)
...
...
@@ -1375,15 +1380,39 @@ void rx_phich(PHY_VARS_UE *ue,
subframe
,
HI16
,
nseq_PHICH
,
ngroup_PHICH
);
ngroup_PHICH
,
ulsch
->
Mlimit
);
//#endif
ulsch
->
harq_processes
[
harq_pid
]
->
subframe_scheduling_flag
=
1
;
// ulsch->harq_processes[harq_pid]->Ndi = 0;
ulsch
->
harq_processes
[
harq_pid
]
->
round
++
;
ulsch
->
harq_processes
[
harq_pid
]
->
rvidx
=
rv_table
[
ulsch
->
harq_processes
[
harq_pid
]
->
round
&
3
];
ulsch
->
O_RI
=
0
;
ulsch
->
O
=
0
;
ulsch
->
uci_format
=
HLC_subband_cqi_nopmi
;
if
(
ulsch
->
harq_processes
[
harq_pid
]
->
round
>=
(
ulsch
->
Mlimit
-
1
)
)
{
// this is last push re transmission
ulsch
->
harq_processes
[
harq_pid
]
->
rvidx
=
rv_table
[
ulsch
->
harq_processes
[
harq_pid
]
->
round
&
3
];
ulsch
->
O_RI
=
0
;
ulsch
->
O
=
0
;
ulsch
->
uci_format
=
HLC_subband_cqi_nopmi
;
// disable phich decoding since it is the last retransmission
ulsch
->
harq_processes
[
harq_pid
]
->
status
=
IDLE
;
//ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 0;
//ulsch->harq_processes[harq_pid]->round = 0;
//LOG_I(PHY,"PUSCH MAX Retransmission acheived ==> flush harq buff (%d) \n",harq_pid);
//LOG_I(PHY,"[HARQ-UL harqId: %d] PHICH NACK MAX RETRANS(%d) ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->Mlimit, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, ulsch->harq_processes[harq_pid]->round);
}
else
{
// ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
ulsch
->
harq_processes
[
harq_pid
]
->
rvidx
=
rv_table
[
ulsch
->
harq_processes
[
harq_pid
]
->
round
&
3
];
ulsch
->
O_RI
=
0
;
ulsch
->
O
=
0
;
ulsch
->
uci_format
=
HLC_subband_cqi_nopmi
;
//LOG_I(PHY,"[HARQ-UL harqId: %d] PHICH NACK ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag,ulsch->harq_processes[harq_pid]->round);
}
}
...
...
@@ -1405,11 +1434,22 @@ void rx_phich(PHY_VARS_UE *ue,
//#endif
}
// LOG_I(PHY,"[HARQ-UL harqId: %d] subframe_scheduling_flag = %d \n",harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag);
// Incase of adaptive retransmission, PHICH is always decoded as ACK (at least with OAI-eNB)
// Workaround:
// rely only on DCI0 decoding and check if NDI has toggled
// save current harq_processes content in temporary struct
// harqId-8 corresponds to the temporary struct. In total we have 8 harq process(0 ..7) + 1 temporary harq process()
//ulsch->harq_processes[8] = ulsch->harq_processes[harq_pid];
ulsch
->
harq_processes
[
harq_pid
]
->
subframe_scheduling_flag
=
0
;
ulsch
->
harq_processes
[
harq_pid
]
->
status
=
IDLE
;
ulsch
->
harq_processes
[
harq_pid
]
->
round
=
0
;
// inform MAC?
ue
->
ulsch_Msg3_active
[
eNB_id
]
=
0
;
//LOG_I(PHY,"[HARQ-UL harqId: %d] PHICH ACK ==> subframe_scheduling_flag = %d round: %d\n", harq_pid, ulsch->harq_processes[harq_pid]->subframe_scheduling_flag, ulsch->harq_processes[harq_pid]->round);
}
}
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
8f6746be
...
...
@@ -1445,6 +1445,9 @@ int32_t generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
uint8_t
eNB_id
);
double
sinr_eff_cqi_calc
(
PHY_VARS_UE
*
phy_vars_ue
,
uint8_t
eNB_id
);
uint8_t
sinr2cqi
(
double
sinr
,
uint8_t
trans_mode
);
int
generate_eNB_ulsch_params_from_dci
(
PHY_VARS_eNB
*
PHY_vars_eNB
,
eNB_rxtx_proc_t
*
proc
,
void
*
dci_pdu
,
...
...
@@ -1712,6 +1715,20 @@ void generate_pucch1x(int32_t **txdataF,
int16_t
amp
,
uint8_t
subframe
);
void
generate_pucch2x
(
int32_t
**
txdataF
,
LTE_DL_FRAME_PARMS
*
fp
,
uint8_t
ncs_cell
[
20
][
7
],
PUCCH_FMT_t
fmt
,
PUCCH_CONFIG_DEDICATED
*
pucch_config_dedicated
,
uint16_t
n2_pucch
,
uint16_t
*
payload
,
int
A
,
int
B2
,
int16_t
amp
,
uint8_t
subframe
,
uint16_t
rnti
);
void
generate_pucch_emul
(
PHY_VARS_UE
*
phy_vars_ue
,
UE_rxtx_proc_t
*
proc
,
PUCCH_FMT_t
format
,
...
...
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
8f6746be
...
...
@@ -442,7 +442,7 @@ inline void pucch2x_scrambling(LTE_DL_FRAME_PARMS *fp,int subframe,uint16_t rnti
int
i
;
uint8_t
c
;
x2
=
(
rnti
<<
14
)
+
(
(
1
+
subframe
)
<<
16
)
*
(
1
+
(
fp
->
Nid_cell
<<
1
));
//this is c_init in 36.211 Sec 6.3.1
x2
=
(
rnti
)
+
((
uint32_t
)
(
1
+
subframe
)
<<
16
)
*
(
1
+
(
fp
->
Nid_cell
<<
1
));
//this is c_init in 36.211 Sec 6.3.1
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
for
(
i
=
0
;
i
<
19
;
i
++
)
{
c
=
(
uint8_t
)((
s
>>
i
)
&
1
);
...
...
@@ -456,22 +456,24 @@ inline void pucch2x_modulation(uint8_t *btilde,int16_t *d,int16_t amp) {
int
i
;
for
(
i
=
0
;
i
<
20
;
i
++
)
d
[
i
]
=
btilde
[
i
]
==
1
?
amp
:
-
amp
;
d
[
i
]
=
btilde
[
i
]
==
1
?
-
amp
:
amp
;
}
uint32_t
pucch_code
[
13
]
=
{
0xFFFFF
,
0x5A933
,
0x10E5A
,
0x6339C
,
0x73CE0
,
0xFFC00
,
0xD8E64
,
0x4F6B0
,
0x218EC
,
0x1B746
,
0x0FFFF
,
0x33FFF
,
0x3FFFC
};
void
generate_pucch2x
(
int32_t
**
txdataF
,
LTE_DL_FRAME_PARMS
*
fp
,
uint8_t
ncs_cell
[
20
][
7
],
PUCCH_FMT_t
fmt
,
PUCCH_CONFIG_DEDICATED
*
pucch_config_dedicated
,
uint16_t
n2_pucch
,
uint8_t
shortened_format
,
uint32_t
*
payload
,
uint16_t
*
payload
,
int
A
,
int
B2
,
int16_t
amp
,
...
...
@@ -486,13 +488,14 @@ void generate_pucch2x(int32_t **txdataF,
uint8_t
NRB2
=
fp
->
pucch_config_common
.
nRB_CQI
;
uint8_t
Ncs1
=
fp
->
pucch_config_common
.
nCS_AN
;
uint32_t
u0
=
(
fp
->
Nid_cell
+
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
subframe
<<
1
])
%
30
;
uint32_t
u1
=
(
fp
->
Nid_cell
+
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
grouphop
[
1
+
(
subframe
<<
1
)])
%
30
;
uint32_t
v0
=
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
subframe
<<
1
];
uint32_t
v1
=
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
1
+
(
subframe
<<
1
)];
uint32_t
u0
=
fp
->
pucch_config_common
.
grouphop
[
subframe
<<
1
];
uint32_t
u1
=
fp
->
pucch_config_common
.
grouphop
[
1
+
(
subframe
<<
1
)];
uint32_t
v0
=
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
subframe
<<
1
];
uint32_t
v1
=
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
seqhop
[
1
+
(
subframe
<<
1
)];
uint32_t
z
[
12
*
14
],
*
zptr
;
uint32_t
u
,
v
,
n
;
uint8_t
ns
,
N_UL_symb
,
nsymb
;
uint8_t
ns
,
N_UL_symb
,
nsymb
_slot0
,
nsymb_pertti
;
uint32_t
nprime
,
l
,
n_cs
;
int
alpha_ind
,
data_ind
;
int16_t
ref_re
,
ref_im
;
...
...
@@ -509,7 +512,6 @@ void generate_pucch2x(int32_t **txdataF,
return
;
}
// pucch2x_encoding
for
(
i
=
0
;
i
<
A
;
i
++
)
if
((
*
payload
&
(
1
<<
i
))
>
0
)
...
...
@@ -545,66 +547,72 @@ void generate_pucch2x(int32_t **txdataF,
}
}
zptr
=
z
;
#ifdef DEBUG_PUCCH_TX
printf
(
"[PHY] PUCCH2x: n2_pucch %d
\n
"
,
n2_pucch
);
#endif
N_UL_symb
=
(
fp
->
Ncp
==
0
)
?
7
:
6
;
data_ind
=
0
;
zptr
=
z
;
for
(
ns
=
(
subframe
<<
1
),
u
=
u0
,
v
=
v0
;
ns
<
(
2
+
(
subframe
<<
1
));
ns
++
,
u
=
u1
,
v
=
v1
)
{
if
((
ns
&
1
)
==
0
)
nprime
=
(
n2_pucch
<
12
*
NRB2
)
?
n2_pucch
%
12
:
(
n2_pucch
+
Ncs1
+
1
)
%
12
;
else
nprime
=
(
n2_pucch
<
12
*
NRB2
)
?
((
12
*
(
nprime
+
1
))
%
13
)
-
1
:
(
10
-
n2_pucch
)
%
12
;
nprime
=
(
n2_pucch
<
12
*
NRB2
)
?
n2_pucch
%
12
:
(
n2_pucch
+
Ncs1
+
1
)
%
12
;
else
{
nprime
=
(
n2_pucch
<
12
*
NRB2
)
?