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
Michael Black
OpenXG-RAN
Commits
04d27b9c
Commit
04d27b9c
authored
Jun 11, 2020
by
Andrew Burger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finalized Raymond changes
parent
898d402a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
94 deletions
+107
-94
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+6
-6
openair2/PHY_INTERFACE/phy_stub_UE.h
openair2/PHY_INTERFACE/phy_stub_UE.h
+3
-0
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+98
-88
No files found.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
04d27b9c
...
...
@@ -50,6 +50,9 @@ queue_t tx_req_pdu_queue;
queue_t
ul_config_req_queue
;
queue_t
hi_dci0_req_queue
;
int
subframe_sf
=
0
;
int
frame_sfn
=
0
;
void
init_queue
(
queue_t
*
q
)
{
memset
(
q
,
0
,
sizeof
(
*
q
));
pthread_mutex_init
(
&
q
->
mutex
,
NULL
);
...
...
@@ -1152,14 +1155,11 @@ void *ue_standalone_pnf_task(void *context)
continue
;
}
if
(
len
==
2
&&
len
>
0
)
if
(
len
==
sizeof
(
uint16_t
)
)
{
memcpy
((
void
*
)
&
sfn_sf
,
buffer
,
sizeof
(
sfn_sf
));
if
(
sfn_sf
%
300
==
0
)
{
LOG_I
(
MAC
,
"Unpacked sfn_sf sf: %u sfn: %u
\n
"
,
NFAPI_SFNSF2SFN
(
sfn_sf
),
NFAPI_SFNSF2SF
(
sfn_sf
));
}
subframe_sf
=
NFAPI_SFNSF2SF
(
sfn_sf
);
frame_sfn
=
NFAPI_SFNSF2SFN
(
sfn_sf
);
}
else
{
...
...
openair2/PHY_INTERFACE/phy_stub_UE.h
View file @
04d27b9c
...
...
@@ -156,4 +156,7 @@ extern queue_t hi_dci0_req_queue;
extern
nfapi_ul_config_request_t
*
ul_config_req
;
extern
nfapi_hi_dci0_request_t
*
hi_dci0_req
;
extern
int
subframe_sf
;
extern
int
frame_sfn
;
#endif
/* PHY_STUB_UE_H_ */
targets/RT/USER/lte-ue.c
View file @
04d27b9c
...
...
@@ -94,7 +94,6 @@ extern int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind);
extern
int
oai_nfapi_rx_ind
(
nfapi_rx_indication_t
*
ind
);
extern
int
multicast_link_write_sock
(
int
groupP
,
char
*
dataP
,
uint32_t
sizeP
);
extern
uint16_t
sf_ahead
;
//extern int tx_req_UE_MAC1();
...
...
@@ -1056,6 +1055,10 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
int
num_pairs
=
0
;
int
num_lone
=
0
;
int
last_sf
=
0
;
int
last_sfn
=
0
;
bool
sfn_sf_changed
=
false
;
while
(
!
oai_exit
)
{
if
(
ue_thread_id
==
0
)
{
...
...
@@ -1078,15 +1081,19 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
exit_fun
(
"nothing to add"
);
}
}
proc
->
subframe_rx
=
timer_subframe
;
// set this to sf from proxy **Get from Queue - Andrew
proc
->
frame_rx
=
timer_frame
;
// set this to sfn from proxy **Get from Queue - Andrew
// variable to say that there has been a change in sf and sfn - Andrew
proc
->
subframe_rx
=
subframe_sf
;
proc
->
frame_rx
=
frame_sfn
;
if
(
proc
->
subframe_rx
!=
last_sf
&&
proc
->
frame_rx
!=
last_sfn
)
{
last_sf
=
proc
->
subframe_rx
;
last_sfn
=
proc
->
frame_rx
;
sfn_sf_changed
=
true
;
}
// FDD and TDD tx timing settings.
// XXX:It is the result of timing adjustment in debug.
// It is necessary to investigate why this will work in the future.
proc
->
subframe_tx
=
(
timer_subframe
+
sf_ahead
)
%
10
;
proc
->
subframe_tx
=
(
proc
->
subframe_rx
+
sf_ahead
)
%
10
;
proc
->
frame_tx
=
proc
->
frame_rx
+
(
proc
->
subframe_rx
>
(
9
-
sf_ahead
)
?
1
:
0
);
//oai_subframe_ind(proc->frame_rx, proc->subframe_rx);
if
(
NFAPI_MODE
!=
NFAPI_MODE_STANDALONE_PNF
)
{
...
...
@@ -1226,7 +1233,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
}
//for (Mod_id=0; Mod_id<NB_UE_INST; Mod_id++) {
// if sfn_sf change variable is true
if
(
sfn_sf_changed
)
{
for
(
ue_index
=
0
;
ue_index
<
ue_num
;
ue_index
++
)
{
ue_Mod_id
=
ue_thread_id
+
NB_THREAD_INST
*
ue_index
;
UE
=
PHY_vars_UE_g
[
ue_Mod_id
][
0
];
...
...
@@ -1291,6 +1298,9 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
// LOG_I(MAC, "is_prach_subframe: %d UE_mac_inst[ue_MOD_id].SI_Decoded: %u\n",
// is_prach_subframe(&UE->frame_parms, proc->frame_tx, proc->subframe_tx),
// UE_mac_inst[ue_Mod_id].SI_Decoded);
LOG_I
(
MAC
,
"is_prach_subframe: %d UE_mac_inst %d
\n
"
,
is_prach_subframe
(
&
UE
->
frame_parms
,
proc
->
frame_tx
,
proc
->
subframe_tx
),
UE_mac_inst
[
ue_Mod_id
].
SI_Decoded
);
if
(
is_prach_subframe
(
&
UE
->
frame_parms
,
proc
->
frame_tx
,
proc
->
subframe_tx
)
&&
UE_mac_inst
[
ue_Mod_id
].
SI_Decoded
==
1
)
{
// The one working strangely...
//if (is_prach_subframe(&UE->frame_parms,proc->frame_tx, proc->subframe_tx && Mod_id == (module_id_t) init_ra_UE) ) {
...
...
@@ -1322,7 +1332,7 @@ static void *UE_phy_stub_single_thread_rxn_txnp4(void *arg)
phy_procedures_UE_SL_RX
(
UE
,
proc
);
}
//for (Mod_id=0; Mod_id<NB_UE_INST; Mod_id++)
// end of if - Andrew Burger
}
if
(
phy_stub_ticking
!=
NULL
)
{
phy_stub_ticking
->
num_single_thread
[
ue_thread_id
]
=
-
1
;
}
...
...
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