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
465f1a77
Commit
465f1a77
authored
Sep 08, 2020
by
Andrew Burger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New prach procedures
parent
d089d4a2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
29 deletions
+36
-29
openair2/COMMON/platform_constants.h
openair2/COMMON/platform_constants.h
+2
-2
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+1
-1
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+1
-1
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+32
-25
No files found.
openair2/COMMON/platform_constants.h
View file @
465f1a77
...
@@ -84,8 +84,8 @@
...
@@ -84,8 +84,8 @@
#define MAX_eNB 2
#define MAX_eNB 2
#define MAX_gNB 2
#define MAX_gNB 2
#else
#else
#define MAX_MOBILES_PER_ENB 2
0
// This was maxed at 4 Why? -Andrew
#define MAX_MOBILES_PER_ENB 2
56
// This was maxed at 4 Why? -Andrew
#define MAX_MOBILES_PER_ENB_NB_IoT
4
#define MAX_MOBILES_PER_ENB_NB_IoT
256
#define MAX_MOBILES_PER_GNB 2//16
#define MAX_MOBILES_PER_GNB 2//16
#define MAX_eNB 2
#define MAX_eNB 2
#define MAX_gNB 2
#define MAX_gNB 2
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
465f1a77
...
@@ -2603,7 +2603,7 @@ ue_scheduler(const module_id_t module_idP,
...
@@ -2603,7 +2603,7 @@ ue_scheduler(const module_id_t module_idP,
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
{
// phy_stub mode
if
(
NFAPI_MODE
==
NFAPI_UE_STUB_PNF
||
NFAPI_MODE
==
NFAPI_MODE_STANDALONE_PNF
)
{
// phy_stub mode
// Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
// Modification for phy_stub mode operation here. We only need to make sure that the ue_mode is back to
// PRACH state.
// PRACH state.
LOG_
I
(
MAC
,
"nfapi_mode3: Setting UE_mode to PRACH 2
\n
"
);
LOG_
A
(
MAC
,
"nfapi_mode3: Setting UE_mode to PRACH 2
\n
"
);
UE_mac_inst
[
module_idP
].
UE_mode
[
eNB_indexP
]
=
PRACH
;
UE_mac_inst
[
module_idP
].
UE_mode
[
eNB_indexP
]
=
PRACH
;
//ra_failed(module_idP,CC_id,eNB_index);UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
//ra_failed(module_idP,CC_id,eNB_index);UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 0;
}
else
{
}
else
{
...
...
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
465f1a77
...
@@ -921,7 +921,7 @@ void hi_dci0_req_UE_MAC(int sfn,
...
@@ -921,7 +921,7 @@ void hi_dci0_req_UE_MAC(int sfn,
// The following set of memcpy functions should be getting called as callback
// The following set of memcpy functions should be getting called as callback
// functions from pnf_p7_subframe_ind.
// functions from pnf_p7_subframe_ind.
int
memcpy_dl_config_req
(
L1_rxtx_proc_t
*
proc
,
int
memcpy_dl_config_req
(
L1_rxtx_proc_t
*
proc
,
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_pnf_p7_config_t
*
pnf_p7
,
nfapi_dl_config_request_t
*
req
)
{
nfapi_dl_config_request_t
*
req
)
{
...
...
targets/RT/USER/lte-ue.c
View file @
465f1a77
...
@@ -1044,6 +1044,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
...
@@ -1044,6 +1044,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
{
{
LOG_W
(
MAC
,
"repeated sfn_sf = %d.%d
\n
"
,
LOG_W
(
MAC
,
"repeated sfn_sf = %d.%d
\n
"
,
sfn_sf
>>
4
,
sfn_sf
&
15
);
sfn_sf
>>
4
,
sfn_sf
&
15
);
continue
;
}
}
last_sfn_sf
=
sfn_sf
;
last_sfn_sf
=
sfn_sf
;
...
@@ -1171,38 +1172,44 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
...
@@ -1171,38 +1172,44 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
// Prepare the future Tx data
// Prepare the future Tx data
if
((
subframe_select
(
&
UE
->
frame_parms
,
NFAPI_SFNSF2SF
(
sfn_sf
))
==
SF_UL
)
||
if
((
subframe_select
(
&
UE
->
frame_parms
,
NFAPI_SFNSF2SF
(
sfn_sf
))
==
SF_UL
)
||
(
UE
->
frame_parms
.
frame_type
==
FDD
))
(
UE
->
frame_parms
.
frame_type
==
FDD
))
if
(
UE
->
mode
!=
loop_through_memory
)
{
if
(
UE
->
mode
!=
loop_through_memory
)
{
// We make the start of RA between consecutive UEs differ by 20 frames
// We make the start of RA between consecutive UEs differ by 20 frames
//if ((UE_mac_inst[Mod_id].UE_mode[0] == PRACH && Mod_id == 0) || (UE_mac_inst[Mod_id].UE_mode[0] == PRACH && Mod_id>0 && rx_frame >= UE_mac_inst[Mod_id-1].ra_frame + 20) ) {
//if ((UE_mac_inst[Mod_id].UE_mode[0] == PRACH && Mod_id == 0) || (UE_mac_inst[Mod_id].UE_mode[0] == PRACH && Mod_id>0 && rx_frame >= UE_mac_inst[Mod_id-1].ra_frame + 20) ) {
if
(
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]
==
RA_RESPONSE
&&
is_prach_subframe
(
&
UE
->
frame_parms
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
)))
{
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]
=
PRACH
;
}
LOG_I
(
MAC
,
"UE_mode: %d
\n
"
,
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]);
LOG_I
(
MAC
,
"UE_mode: %d
\n
"
,
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]);
if
(
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]
==
PRACH
)
{
//&& ue_Mod_id == next_Mod_id) {
if
(
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]
==
PRACH
)
{
//&& ue_Mod_id == next_Mod_id) {
next_ra_frame
++
;
next_ra_frame
++
;
// if (next_ra_frame > 500) {
// if (next_ra_frame > 500) {
// check if we have PRACH opportunity
// check if we have PRACH opportunity
LOG_I
(
MAC
,
"is_prach_subframe(): %d
\n
"
,
if
(
is_prach_subframe
(
&
UE
->
frame_parms
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
))
&&
UE_mac_inst
[
ue_Mod_id
].
SI_Decoded
==
1
)
is_prach_subframe
(
&
UE
->
frame_parms
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
)));
{
if
(
is_prach_subframe
(
&
UE
->
frame_parms
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
))
&&
UE_mac_inst
[
ue_Mod_id
].
SI_Decoded
==
1
)
{
// The one working strangely...
// The one working strangely...
//if (is_prach_subframe(&UE->frame_parms,NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf) && Mod_id == (module_id_t) init_ra_UE) ) {
//if (is_prach_subframe(&UE->frame_parms,NFAPI_SFNSF2SFN(sfn_sf), NFAPI_SFNSF2SF(sfn_sf) && Mod_id == (module_id_t) init_ra_UE) ) {
PRACH_RESOURCES_t
*
prach_resources
=
ue_get_rach
(
ue_Mod_id
,
0
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
0
,
NFAPI_SFNSF2SF
(
sfn_sf
));
PRACH_RESOURCES_t
*
prach_resources
=
ue_get_rach
(
ue_Mod_id
,
0
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
0
,
NFAPI_SFNSF2SF
(
sfn_sf
));
if
(
prach_resources
!=
NULL
)
if
(
prach_resources
!=
NULL
)
{
{
LOG_I
(
MAC
,
"preamble_received_tar_power: %d
\n
"
,
LOG_I
(
MAC
,
"preamble_received_tar_power: %d
\n
"
,
prach_resources
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
);
prach_resources
->
ra_PREAMBLE_RECEIVED_TARGET_POWER
);
UE_mac_inst
[
ue_Mod_id
].
ra_frame
=
NFAPI_SFNSF2SFN
(
sfn_sf
);
// Is this why RACH comes in late to proxy? - Andrew
UE_mac_inst
[
ue_Mod_id
].
ra_frame
=
NFAPI_SFNSF2SFN
(
sfn_sf
);
// Is this why RACH comes in late to proxy? - Andrew
LOG_D
(
MAC
,
"UE_phy_stub_thread_rxn_txnp4 before RACH, Mod_id: %d frame %d subframe %d
\n
"
,
ue_Mod_id
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
));
LOG_D
(
MAC
,
"UE_phy_stub_thread_rxn_txnp4 before RACH, Mod_id: %d frame %d subframe %d
\n
"
,
ue_Mod_id
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
));
fill_rach_indication_UE_MAC
(
ue_Mod_id
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
),
UL_INFO
,
prach_resources
->
ra_PreambleIndex
,
prach_resources
->
ra_RNTI
);
fill_rach_indication_UE_MAC
(
ue_Mod_id
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
),
UL_INFO
,
prach_resources
->
ra_PreambleIndex
,
prach_resources
->
ra_RNTI
);
sent_any
=
true
;
sent_any
=
true
;
Msg1_transmitted
(
ue_Mod_id
,
0
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
0
);
Msg1_transmitted
(
ue_Mod_id
,
0
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
0
);
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]
=
RA_RESPONSE
;
UE_mac_inst
[
ue_Mod_id
].
UE_mode
[
0
]
=
RA_RESPONSE
;
next_Mod_id
=
ue_Mod_id
+
1
;
next_Mod_id
=
ue_Mod_id
+
1
;
//next_ra_frame = (rx_frame + 20)%1000;
//next_ra_frame = (rx_frame + 20)%1000;
next_ra_frame
=
0
;
next_ra_frame
=
0
;
}
//ue_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode);
}
}
//ue_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode);
}
// }
// }
}
// mode is PRACH
}
// mode is PRACH
// Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
// Substitute call to phy_procedures Tx with call to phy_stub functions in order to trigger
// UE Tx procedures directly at the MAC layer, based on the received ul_config requests from the vnf (eNB).
// UE Tx procedures directly at the MAC layer, based on the received ul_config requests from the vnf (eNB).
...
...
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