Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
95db8f6c
Commit
95db8f6c
authored
May 19, 2017
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warning fixed
parent
e01a3c06
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
50 additions
and
29 deletions
+50
-29
openair1/PHY/INIT/lte_init_nb_iot.c
openair1/PHY/INIT/lte_init_nb_iot.c
+5
-6
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
+1
-1
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
+15
-6
openair2/LAYER2/MAC/IF_Module_nb_iot.c
openair2/LAYER2/MAC/IF_Module_nb_iot.c
+12
-7
openair2/LAYER2/MAC/eNB_scheduler_dlsch_nb_iot.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch_nb_iot.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_primitives_nb_iot.c
openair2/LAYER2/MAC/eNB_scheduler_primitives_nb_iot.c
+5
-5
openair2/LAYER2/MAC/eNB_scheduler_ulsch_nb_iot.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch_nb_iot.c
+4
-2
openair2/PHY_INTERFACE/IF_Module_nb_iot.h
openair2/PHY_INTERFACE/IF_Module_nb_iot.h
+3
-1
record.txt
record.txt
+4
-0
No files found.
openair1/PHY/INIT/lte_init_nb_iot.c
View file @
95db8f6c
...
...
@@ -90,7 +90,7 @@ void NB_phy_config_mib_eNB(int Mod_id,
fp
->
ul_CarrierFreq
=
ul_CarrierFreq
;
init_frame_parms
(
fp
,
1
);
//
init_frame_parms(fp,1);
//init_lte_top(fp);
}
...
...
@@ -104,7 +104,6 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
NB_DL_FRAME_PARMS
*
fp
=
&
PHY_vars_eNB_g
[
Mod_id
][
CC_id
]
->
frame_parms
;
//LTE_eNB_UE_stats *eNB_UE_stats = PHY_vars_eNB_g[Mod_id][CC_id]->eNB_UE_stats;
//int32_t rx_total_gain_eNB_dB = PHY_vars_eNB_g[Mod_id][CC_id]->rx_total_gain_eNB_dB;
int
i
;
uint8_t
MAX_NPRACH
=
4
;
NPRACH_Parameters_NB_r13_t
*
np
;
...
...
@@ -117,7 +116,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
//LOG_D(PHY,"nprach_config_common.rsrp_ThresholdsPrachInfoList = %d\n",fp->nprach_config_common.rsrp_ThresholdsPrachInfoList);
/*Loop over the configuration according to the maxNPRACH_Resources*/
for
(
fp
->
CE
=
0
;
fp
->
CE
<=
MAX_NPRACH
;
fp
->
CE
++
){
for
(
fp
->
CE
=
1
;
fp
->
CE
<=
MAX_NPRACH
;
fp
->
CE
++
){
np
=
radioResourceConfigCommon
->
nprach_Config_r13
.
nprach_ParametersList_r13
.
list
.
array
[
fp
->
CE
];
/*fp->nprach_config_common.nprach_ParametersList.list.array[fp->CE]->maxNumPreambleAttemptCE =np->maxNumPreambleAttemptCE_r13;
//LOG_D(PHY,"nprach_config_common.nprach_ParametersList.list.maxNumPreambleAttemptCE = %d\n",fp->nprach_config_common.nprach_ParametersList.list.maxNumPreambleAttemptCE);
...
...
@@ -169,7 +168,7 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
LOG_D
(
PHY
,
"npusch_config_common.ul_ReferenceSignalsNPUSCH.groupHoppingEnabled = %d]n"
,
fp
->
npusch_config_common
.
ul_ReferenceSignalsNPUSCH
.
groupHoppingEnabled
);
/*should change the part that implement the ul hopping in NB-IoT*/
init_ul_hopping
(
fp
);
//
init_ul_hopping(fp);
/*UL Power Control Config Common*/
...
...
@@ -179,14 +178,14 @@ void NB_phy_config_sib2_eNB(uint8_t Mod_id,
/*DL gap*/
fp
->
DL_gap_config
.
dl_GapDurationCoeff
=
radioResourceConfigCommon
->
dl_Gap_r13
->
dl_GapDurationCoeff_r13
;
fp
->
DL_gap_config
.
dl_GapDurationCoeff
=
radioResourceConfigCommon
->
dl_Gap_r13
->
dl_GapDurationCoeff_r13
;
fp
->
DL_gap_config
.
dl_GapPeriodicity
=
radioResourceConfigCommon
->
dl_Gap_r13
->
dl_GapPeriodicity_r13
;
fp
->
DL_gap_config
.
dl_GapThreshold
=
radioResourceConfigCommon
->
dl_Gap_r13
->
dl_GapThreshold_r13
;
/*PUCCH stuff in LTE*/
//init_ncs_cell(fp,PHY_vars_eNB_g[Mod_id][CC_id]->ncs_cell);
init_ul_hopping
(
fp
);
//
init_ul_hopping(fp);
...
...
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
View file @
95db8f6c
...
...
@@ -46,7 +46,7 @@ typedef enum DCI_format_NB
}
e_DCI_format_NB
;
/// DCI Format Type 0 (180 kHz, 23 bits)
typedef
struct
DCIFormatN0
{
struct
DCIFormatN0
{
/// type = 0 => DCI Format N0, type = 1 => DCI Format N1, 1 bits
uint8_t
type
;
/// Subcarrier indication, 6 bits
...
...
openair1/SCHED/phy_procedures_lte_eNb_nb_iot.c
View file @
95db8f6c
...
...
@@ -123,7 +123,6 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
UNUSED
(
r_type
);
uint32_t
ret
=
0
,
i
,
j
,
k
;
uint32_t
harq_pid
,
harq_idx
,
round
;
uint8_t
nPRS
;
int
sync_pos
;
uint16_t
rnti
=
0
;
uint8_t
access_mode
;
...
...
@@ -182,7 +181,8 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
// check for Msg3
if
(
eNB
->
mac_enabled
==
1
)
{
if
(
eNB
->
UE_stats
[
i
].
mode
==
RA_RESPONSE
)
{
process_Msg3
(
eNB
,
proc
,
i
,
harq_pid
);
/*Process Msg3 TODO*/
//process_Msg3(eNB,proc,i,harq_pid);
}
}
...
...
@@ -240,7 +240,7 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
}
LOG_D
(
PHY
,
"[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, mcs %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d
, nprs %d
), O_ACK %d
\n
"
,
"[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, mcs %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d), O_ACK %d
\n
"
,
eNB
->
Mod_id
,
harq_pid
,
frame
,
subframe
,
eNB
->
ulsch
[
i
]
->
harq_processes
[
harq_pid
]
->
dci_alloc
,
eNB
->
ulsch
[
i
]
->
harq_processes
[
harq_pid
]
->
rar_alloc
,
...
...
@@ -253,7 +253,6 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
eNB
->
ulsch
[
i
]
->
cyclicShift
,
eNB
->
ulsch
[
i
]
->
harq_processes
[
harq_pid
]
->
n_DMRS2
,
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
cyclicShift
,
nPRS
,
eNB
->
ulsch
[
i
]
->
harq_processes
[
harq_pid
]
->
O_ACK
);
eNB
->
pusch_stats_rb
[
i
][(
frame
*
10
)
+
subframe
]
=
eNB
->
ulsch
[
i
]
->
harq_processes
[
harq_pid
]
->
nb_rb
;
eNB
->
pusch_stats_round
[
i
][(
frame
*
10
)
+
subframe
]
=
eNB
->
ulsch
[
i
]
->
harq_processes
[
harq_pid
]
->
round
;
...
...
@@ -440,6 +439,8 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
UL_Info
.
UL_SPEC_Info
[
i
].
sdu_lenP
=
0
;
UL_Info
.
UL_SPEC_Info
[
i
].
harq_pidP
=
harq_pid
;
UL_Info
.
UL_SPEC_Info
[
i
].
msg3_flagP
=
&
eNB
->
ulsch
[
i
]
->
Msg3_flag
;
UL_Info
.
UL_SPEC_Info
[
i
].
NAK
=
1
;
UL_Info
.
UE_NUM
++
;
}
}
...
...
@@ -492,6 +493,7 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
UL_Info
.
UL_SPEC_Info
[
i
].
sdu_lenP
=
eNB
->
ulsch
[
i
]
->
harq_processes
[
harq_pid
]
->
TBS
>>
3
;
UL_Info
.
UL_SPEC_Info
[
i
].
harq_pidP
=
harq_pid
;
UL_Info
.
UL_SPEC_Info
[
i
].
msg3_flagP
=
&
eNB
->
ulsch
[
i
]
->
Msg3_flag
;
UL_Info
.
UE_NUM
++
;
}
/* Need check if this needed in NB-IoT
...
...
@@ -559,6 +561,7 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
UL_Info
.
UL_SPEC_Info
[
i
].
sdu_lenP
=
eNB
->
ulsch
[
i
]
->
harq_processes
[
harq_pid
]
->
TBS
>>
3
;
UL_Info
.
UL_SPEC_Info
[
i
].
harq_pidP
=
harq_pid
;
UL_Info
.
UL_SPEC_Info
[
i
].
msg3_flagP
=
NULL
;
UL_Info
.
UE_NUM
++
;
#ifdef LOCALIZATION
start_meas
(
&
eNB
->
localization_stats
);
...
...
@@ -594,12 +597,12 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
i
);
#endif
// Process HARQ only in NPUSCH
process_HARQ_feedback
(
i
,
/*
process_HARQ_feedback(i,
eNB,proc,
1, // pusch_flag
0,
0,
0
);
0);
*/
#ifdef DEBUG_PHY_PROC
LOG_D
(
PHY
,
"[eNB %d] Frame %d subframe %d, sect %d: received ULSCH harq_pid %d for UE %d, ret = %d, CQI CRC Status %d, ACK %d,%d, ulsch_errors %d/%d
\n
"
,
...
...
@@ -626,6 +629,9 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
}
}
// ulsch[0] && ulsch[0]->rnti>0 && ulsch[0]->subframe_scheduling_flag == 1
//store the parameter to determine if UL failure or not
UL_Info
.
UL_SPEC_Info
[
i
].
ulsch_consecutive_errors
=
eNB
->
UE_stats
[
i
].
ulsch_consecutive_errors
;
// update ULSCH statistics for tracing
if
((
frame
%
100
==
0
)
&&
(
subframe
==
4
))
{
...
...
@@ -693,6 +699,9 @@ void NB_phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,con
stop_meas
(
&
eNB
->
phy_proc_rx
);
/*Exact not here, but use to debug*/
UL_INDICATION
(
UL_Info
);
}
#undef DEBUG_PHY_PROC
...
...
openair2/LAYER2/MAC/IF_Module_nb_iot.c
View file @
95db8f6c
//#include "LAYER2/MAC/defs_nb_iot.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto_nb_iot.h"
#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "platform_types.h"
void
UL_indication
(
UL_IND_t
UL_INFO
,
frame_t
frame
,
sub_frame_t
subframe
,
module_id_t
module_id
)
void
UL_indication
(
UL_IND_t
UL_INFO
)
{
int
i
=
0
;
UL_INFO
.
test
=
1
;
if
(
UL_INFO
.
test
==
1
)
{
/*If there is a preamble, do the initiate RA procedure*/
if
(
UL_INFO
.
preamble_index
&&
UL_INFO
.
timing_offset
)
NB_initiate_ra_proc
(
UL_INFO
.
module_id
,
UL_INFO
.
CC_id
,
UL_INFO
.
frame
,
UL_INFO
.
preamble_index
,
UL_INFO
.
timing_offset
,
UL_INFO
.
subframe
);
/*If there is a Uplink SDU (even MSG3, NAK) need to send to MAC*/
for
(
i
=
0
;
i
<
UL_INFO
.
UE_NUM
;
i
++
)
{
/*For MSG3, Normal Uplink Data, NAK*/
...
...
@@ -31,5 +32,9 @@ void UL_indication(UL_IND_t UL_INFO, frame_t frame, sub_frame_t subframe, module
}
}
NB_eNB_dlsch_ulsch_scheduler
(
module_id
,
0
,
frame
,
subframe
);
NB_eNB_dlsch_ulsch_scheduler
(
UL_INFO
.
module_id
,
0
,
UL_INFO
.
frame
,
UL_INFO
.
subframe
);
}
void
Schedule_Response
(
Sched_Rsp_t
Sched_INFO
){
//todo
}
\ No newline at end of file
openair2/LAYER2/MAC/eNB_scheduler_dlsch_nb_iot.c
View file @
95db8f6c
...
...
@@ -66,7 +66,7 @@
//#define DEBUG_eNB_SCHEDULER 1
NB_get_dlsch_sdu
(
uint8_t
*
NB_get_dlsch_sdu
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives_nb_iot.c
View file @
95db8f6c
...
...
@@ -61,7 +61,7 @@
#define ENABLE_MAC_PAYLOAD_DEBUG
#define DEBUG_eNB_SCHEDULER 1
/*TODO NB_mac_phy_remove_ue*/
int
NB_rrc_mac_remove_ue
(
...
...
@@ -76,7 +76,7 @@ int NB_rrc_mac_remove_ue(
if
(
UE_id
==
-
1
)
{
printf
(
"MAC: cannot remove UE rnti %x
\n
"
,
rntiP
);
LOG_W
(
MAC
,
"NB_rrc_mac_remove_ue: UE %x not found
\n
"
,
rntiP
);
mac_phy_remove_ue
(
mod_idP
,
rntiP
);
//NB_
mac_phy_remove_ue(mod_idP, rntiP);
return
0
;
}
...
...
@@ -84,7 +84,7 @@ printf("MAC: cannot remove UE rnti %x\n", rntiP);
printf
(
"MAC: remove UE %d rnti %x
\n
"
,
UE_id
,
rntiP
);
LOG_I
(
MAC
,
"Removing UE %d from Primary CC_id %d (rnti %x)
\n
"
,
UE_id
,
pCC_id
,
rntiP
);
dump_ue_list
(
UE_list
,
0
);
//may should be changed
//
dump_ue_list(UE_list,0); //may should be changed
UE_list
->
active
[
UE_id
]
=
FALSE
;
UE_list
->
num_UEs
--
;
...
...
@@ -103,7 +103,7 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP);
eNB_dlsch_info
[
mod_idP
][
pCC_id
][
UE_id
].
rnti
=
NOT_A_RNTI
;
eNB_dlsch_info
[
mod_idP
][
pCC_id
][
UE_id
].
status
=
S_DL_NONE
;
NB_mac_phy_remove_ue
(
mod_idP
,
rntiP
);
//
NB_mac_phy_remove_ue(mod_idP,rntiP);
// check if this has an RA process active
RA_TEMPLATE_NB
*
RA_template
;
...
...
@@ -125,7 +125,7 @@ printf("MAC: remove UE %d rnti %x\n", UE_id, rntiP);
}
//------------------------------------------------------------------------------
DCI_PDU
*
NB_get_dci_sdu
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
subframeP
)
DCI_PDU
_NB
*
NB_get_dci_sdu
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
subframeP
)
//------------------------------------------------------------------------------
{
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch_nb_iot.c
View file @
95db8f6c
...
...
@@ -161,7 +161,8 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_failure_timer
=
0
;
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_out_of_sync
>
0
)
{
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_out_of_sync
=
0
;
NB_mac_eNB_rrc_ul_in_sync
(
enb_mod_idP
,
CC_idP
,
frameP
,
subframeP
,(((
uint16_t
)
payload_ptr
[
0
])
<<
8
)
+
payload_ptr
[
1
]);
/*In RRC branch*/
//NB_mac_eNB_rrc_ul_in_sync(enb_mod_idP,CC_idP,frameP,subframeP,(((uint16_t)payload_ptr[0])<<8) + payload_ptr[1]);
}
}
crnti_rx
=
1
;
...
...
@@ -270,6 +271,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
}
if
(
Is_rrc_registered
==
1
)
/* In RRC branch
NB_mac_rrc_data_ind(
enb_mod_idP,
CC_idP,
...
...
@@ -280,7 +282,7 @@ void NB_rx_sdu(const module_id_t enb_mod_idP,
rx_lengths[i],
ENB_FLAG_YES,
enb_mod_idP,
0
);
0);
*/
if
(
num_ce
>
0
)
{
// handle msg3 which is not RRCConnectionRequest
...
...
openair2/PHY_INTERFACE/IF_Module_nb_iot.h
View file @
95db8f6c
...
...
@@ -29,6 +29,8 @@ int harq_pidP;
uint8_t
*
msg3_flagP
;
//ACK/NAK
boolean_t
NAK
;
// ULSCH consecutive error
uint32_t
ulsch_consecutive_errors
;
}
UL_SPEC_t
;
...
...
@@ -99,7 +101,7 @@ typedef struct{
/*Interface for uplink, transmitting the Preamble(list), ULSCH SDU, NAK, Tick (trigger scheduler)
*/
void
UL_indication
(
UL_IND_t
UL_INFO
,
frame_t
frame
,
sub_frame_t
subframe
,
module_id_t
module_id
);
void
UL_indication
(
UL_IND_t
UL_INFO
);
/*Interface for Downlink, transmitting the DLSCH SDU, DCI SDU*/
void
Schedule_Response
(
Sched_Rsp_t
Sched_INFO
);
...
...
record.txt
View file @
95db8f6c
...
...
@@ -58,3 +58,7 @@ Comment: Complete the UL_INDICATION
Functions: UL_INDICATION()
Parameters: Sched_Rsp for Interface Module
5/19
Comment: 15 warnings fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment