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
promise
OpenXG-RAN
Commits
c7439dcc
Commit
c7439dcc
authored
Dec 17, 2019
by
Nick Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add state machine into rach
parent
7bdee0c7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
12 deletions
+18
-12
openair2/LAYER2/MAC/defs_NB_IoT.h
openair2/LAYER2/MAC/defs_NB_IoT.h
+7
-0
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
+3
-8
openair2/LAYER2/MAC/extern_NB_IoT.h
openair2/LAYER2/MAC/extern_NB_IoT.h
+2
-0
openair2/LAYER2/MAC/vars_NB_IoT.h
openair2/LAYER2/MAC/vars_NB_IoT.h
+2
-0
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
+4
-4
No files found.
openair2/LAYER2/MAC/defs_NB_IoT.h
View file @
c7439dcc
...
...
@@ -99,6 +99,13 @@
/*!\brief LCID of padding LCID for DLSCH */
#define SHORT_PADDING 31
typedef
enum
rach_state_e
{
initial_access
=
0
,
rach_for_auth_rsp
,
rach_for_next
,
}
rach_state_t
;
typedef
enum
tone_type_e
{
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch_NB_IoT.c
View file @
c7439dcc
...
...
@@ -36,7 +36,6 @@
unsigned
char
str20
[]
=
"DCI_uss"
;
unsigned
char
str21
[]
=
"DATA_uss"
;
int
second_flag
=
0
;
// scheduling UL
int
schedule_UL_NB_IoT
(
eNB_MAC_INST_NB_IoT
*
mac_inst
,
UE_TEMPLATE_NB_IoT
*
UE_info
,
uint32_t
subframe
,
uint32_t
frame
,
uint32_t
H_SFN
,
UE_SCHED_CTRL_NB_IoT_t
*
UE_sched_ctrl_info
){
...
...
@@ -235,10 +234,6 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
{
LOG_I
(
MAC
,
"Find UE in CE 2 list, update ul_total_buffer to %d bytes
\n
"
,
BSR_table
[
BSR_index
]);
UE_info
->
ul_total_buffer
=
BSR_table
[
BSR_index
];
if
(
UE_info
->
ul_total_buffer
>=
10
&&
UE_info
->
ul_total_buffer
<=
20
)
{
second_flag
=
1
;
}
}
else
LOG_E
(
MAC
,
"UE info empty
\n
"
);
...
...
@@ -287,7 +282,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
case
DCCH0_NB_IoT
:
case
DCCH1_NB_IoT
:
LOG_I
(
MAC
,
"DCCH PDU Here
\n
"
);
if
(
second_flag
==
0
)
if
(
(
UE_state_machine
==
initial_access
)
||
(
UE_state_machine
==
rach_for_next
)
)
{
mac_rlc_data_ind
(
module_id
,
...
...
@@ -308,7 +303,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
UE_info
->
direction
=
1
;
//1 for DL scheduler
LOG_I
(
MAC
,
"After receive Msg5, change the UE scheduling direction to DL
\n
"
);
}
}
else
if
(
second_flag
==
1
)
}
else
if
(
UE_state_machine
==
rach_for_auth_rsp
)
{
LOG_N
(
MAC
,
"Here we are for the DCI N0 generating
\n
"
);
if
(
UE_info
!=
NULL
)
...
...
@@ -316,7 +311,7 @@ void rx_sdu_NB_IoT(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t
UE_info
->
direction
=
0
;
//1 for DL scheduler
LOG_I
(
MAC
,
"Change direction into 0
\n
"
);
}
second_flag
=
0
;
UE_state_machine
=
rach_for_next
;
}
break
;
...
...
openair2/LAYER2/MAC/extern_NB_IoT.h
View file @
c7439dcc
...
...
@@ -113,6 +113,8 @@ extern const int dl_rep[3];
extern
const
uint32_t
dci_rep
[
3
];
extern
const
uint32_t
harq_rep
[
3
];
extern
rach_state_t
UE_state_machine
;
//SIBs
extern
int
extend_space
[
2
];
extern
int
extend_alpha_offset
[
2
];
...
...
openair2/LAYER2/MAC/vars_NB_IoT.h
View file @
c7439dcc
...
...
@@ -140,6 +140,8 @@ int extend_alpha_offset[2] = {10, 10};
int
uss_space
=
320
;
int
uss_alpha_offset
=
10
;
rach_state_t
UE_state_machine
=
initial_access
;
const
int
si_repetition_pattern
[
4
]
=
{
20
,
40
,
80
,
160
};
#endif
...
...
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
View file @
c7439dcc
...
...
@@ -3,7 +3,7 @@
#include "LAYER2/MAC/extern_NB_IoT.h"
int
tmp
=
0
;
int
block_rach
=
0
;
//
int block_rach = 0;
int
first_msg4
=
0
;
void
simulate_preamble
(
UL_IND_NB_IoT_t
*
UL_INFO
,
int
CE
,
int
sc
)
...
...
@@ -94,7 +94,7 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
//for(i=0;i<UL_INFO->nrach_ind.number_of_initial_scs_detected;i++)
for
(
i
=
0
;
i
<
1
;
i
++
)
{
if
(
block_rach
==
0
)
if
(
UE_state_machine
==
initial_access
)
{
// initiate_ra here, some useful inforamtion :
LOG_D
(
MAC
,
"Init_RA_NB_IoT in, index of sc = %d
\n
"
,(
UL_INFO
->
nrach_ind
.
nrach_pdu_list
+
i
)
->
nrach_indication_rel13
.
initial_sc
);
...
...
@@ -105,7 +105,7 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
//timing_offset = Timing_advance * 16
(
UL_INFO
->
nrach_ind
.
nrach_pdu_list
+
i
)
->
nrach_indication_rel13
.
timing_advance
*
16
);
}
else
if
(
block_rach
==
1
)
}
else
if
(
UE_state_machine
==
rach_for_auth_rsp
)
{
LOG_N
(
MAC
,
"It is the second time that this UE try to rach
\n
"
);
init_RA_NB_IoT
(
mac_inst
,
...
...
@@ -154,7 +154,7 @@ void UL_indication_NB_IoT(UL_IND_NB_IoT_t *UL_INFO)
LOG_I
(
MAC
,
"This UE get the response of HARQ DL : ACK, update the UL buffer for next message
\n
"
);
ue_info
->
direction
=-
1
;
//ue_info->ul_total_buffer = 11;
block_rach
=
1
;
UE_state_machine
=
rach_for_auth_rsp
;
//LOG_I(MAC,"This UE get the response of HARQ DL : NACK, and will start the next harq round : %d\n",ue_info->HARQ_round);
//ue_info->direction=1;
//ue_info->HARQ_round++;
...
...
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