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
0165ffd1
Commit
0165ffd1
authored
Feb 23, 2022
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'episys/master-sa' into episys/mel/debug-thorughput-new-sa-master
parents
ca336ea9
817fc792
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
9 deletions
+52
-9
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+23
-4
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
+4
-1
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+21
-3
openair2/PHY_INTERFACE/phy_stub_UE.h
openair2/PHY_INTERFACE/phy_stub_UE.h
+4
-1
No files found.
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
0165ffd1
...
@@ -955,6 +955,17 @@ static void save_pdsch_pdu_for_crnti(nfapi_nr_dl_tti_request_t *dl_tti_request)
...
@@ -955,6 +955,17 @@ static void save_pdsch_pdu_for_crnti(nfapi_nr_dl_tti_request_t *dl_tti_request)
}
}
}
}
static
uint16_t
get_message_id
(
const
uint8_t
*
buffer
,
ssize_t
len
)
{
if
(
len
<
4
)
return
0
;
// Unpack 2 bytes message_id from buffer.
uint16_t
v
;
memcpy
(
&
v
,
buffer
+
2
,
sizeof
(
v
));
return
ntohs
(
v
);
}
void
*
nrue_standalone_pnf_task
(
void
*
context
)
void
*
nrue_standalone_pnf_task
(
void
*
context
)
{
{
struct
sockaddr_in
server_address
;
struct
sockaddr_in
server_address
;
...
@@ -998,14 +1009,22 @@ void *nrue_standalone_pnf_task(void *context)
...
@@ -998,14 +1009,22 @@ void *nrue_standalone_pnf_task(void *context)
abort
();
abort
();
}
}
}
}
else
if
(
len
==
sizeof
(
nr_phy_channel_params_t
))
else
if
(
get_message_id
((
const
uint8_t
*
)
buffer
,
len
)
==
0x0FFF
)
// 0x0FFF : channel info identifier.
{
{
nr_phy_channel_params_t
*
ch_info
=
CALLOC
(
1
,
sizeof
(
*
ch_info
));
nr_phy_channel_params_t
*
ch_info
=
CALLOC
(
1
,
sizeof
(
*
ch_info
));
memcpy
(
ch_info
,
buffer
,
sizeof
(
*
ch_info
));
memcpy
(
ch_info
,
buffer
,
sizeof
(
*
ch_info
));
slot_rnti_mcs
[
NFAPI_SFNSLOT2SLOT
(
ch_info
->
sfn_slot
)].
sinr
=
ch_info
->
sinr
;
if
(
ch_info
->
nb_of_sinrs
>
1
)
LOG_D
(
NR_PHY
,
"Received_SINR = %f, sfn:slot %d:%d
\n
"
,
LOG_W
(
NR_PHY
,
"Expecting at most one SINR.
\n
"
);
ch_info
->
sinr
,
NFAPI_SFNSLOT2SFN
(
ch_info
->
sfn_slot
),
NFAPI_SFNSLOT2SLOT
(
ch_info
->
sfn_slot
));
// TODO: Update sinr field of slot_rnti_mcs to be array.
for
(
int
i
=
0
;
i
<
ch_info
->
nb_of_sinrs
;
++
i
)
{
slot_rnti_mcs
[
NFAPI_SFNSLOT2SLOT
(
ch_info
->
sfn_slot
)].
sinr
=
ch_info
->
sinr
[
i
];
LOG_D
(
NR_PHY
,
"Received_SINR[%d] = %f, sfn:slot %d:%d
\n
"
,
i
,
ch_info
->
sinr
[
i
],
NFAPI_SFNSLOT2SFN
(
ch_info
->
sfn_slot
),
NFAPI_SFNSLOT2SLOT
(
ch_info
->
sfn_slot
));
}
if
(
!
put_queue
(
&
nr_chan_param_queue
,
ch_info
))
if
(
!
put_queue
(
&
nr_chan_param_queue
,
ch_info
))
{
{
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h
View file @
0165ffd1
...
@@ -45,13 +45,16 @@
...
@@ -45,13 +45,16 @@
#define NUM_SINR 100
#define NUM_SINR 100
#define NUM_BLER_COL 13
#define NUM_BLER_COL 13
#define NUM_NFAPI_SLOT 20
#define NUM_NFAPI_SLOT 20
#define NR_NUM_LAYER 1
typedef
struct
NR_UL_TIME_ALIGNMENT
NR_UL_TIME_ALIGNMENT_t
;
typedef
struct
NR_UL_TIME_ALIGNMENT
NR_UL_TIME_ALIGNMENT_t
;
typedef
struct
nr_phy_channel_params_t
typedef
struct
nr_phy_channel_params_t
{
{
uint16_t
sfn_slot
;
uint16_t
sfn_slot
;
float
sinr
;
uint16_t
message_id
;
uint16_t
nb_of_sinrs
;
float
sinr
[
NR_NUM_LAYER
];
// Incomplete, need all channel parameters
// Incomplete, need all channel parameters
}
nr_phy_channel_params_t
;
}
nr_phy_channel_params_t
;
...
...
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
0165ffd1
...
@@ -1259,6 +1259,17 @@ void ue_init_standalone_socket(int tx_port, int rx_port)
...
@@ -1259,6 +1259,17 @@ void ue_init_standalone_socket(int tx_port, int rx_port)
}
}
}
}
static
uint16_t
get_message_id
(
const
uint8_t
*
buffer
,
ssize_t
len
)
{
if
(
len
<
4
)
return
0
;
// Unpack 2 bytes message_id from buffer.
uint16_t
v
;
memcpy
(
&
v
,
buffer
+
2
,
sizeof
(
v
));
return
ntohs
(
v
);
}
void
*
ue_standalone_pnf_task
(
void
*
context
)
void
*
ue_standalone_pnf_task
(
void
*
context
)
{
{
struct
sockaddr_in
server_address
;
struct
sockaddr_in
server_address
;
...
@@ -1301,7 +1312,7 @@ void *ue_standalone_pnf_task(void *context)
...
@@ -1301,7 +1312,7 @@ void *ue_standalone_pnf_task(void *context)
abort
();
abort
();
}
}
}
}
else
if
(
len
==
sizeof
(
phy_channel_params_t
))
else
if
(
get_message_id
((
const
uint8_t
*
)
buffer
,
len
)
==
0x0FFF
)
// 0x0FFF : channel info identifier.
{
{
phy_channel_params_t
ch_info
;
phy_channel_params_t
ch_info
;
memcpy
(
&
ch_info
,
buffer
,
sizeof
(
phy_channel_params_t
));
memcpy
(
&
ch_info
,
buffer
,
sizeof
(
phy_channel_params_t
));
...
@@ -1314,8 +1325,15 @@ void *ue_standalone_pnf_task(void *context)
...
@@ -1314,8 +1325,15 @@ void *ue_standalone_pnf_task(void *context)
uint16_t
sf
=
ch_info
.
sfn_sf
&
15
;
uint16_t
sf
=
ch_info
.
sfn_sf
&
15
;
assert
(
sf
<
10
);
assert
(
sf
<
10
);
sf_rnti_mcs
[
sf
].
sinr
=
ch_info
.
sinr
;
if
(
ch_info
.
nb_of_sinrs
>
1
)
LOG_D
(
MAC
,
"Received_SINR = %f
\n
"
,
ch_info
.
sinr
);
LOG_W
(
MAC
,
"Expecting at most one SINR.
\n
"
);
// TODO: Update sinr field of slot_rnti_mcs to be array.
for
(
int
i
=
0
;
i
<
ch_info
.
nb_of_sinrs
;
++
i
)
{
sf_rnti_mcs
[
sf
].
sinr
=
ch_info
.
sinr
[
i
];
LOG_D
(
MAC
,
"Received_SINR[%d] = %f
\n
"
,
i
,
ch_info
.
sinr
[
i
]);
}
}
}
else
else
{
{
...
...
openair2/PHY_INTERFACE/phy_stub_UE.h
View file @
0165ffd1
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#define NUM_MCS 28
#define NUM_MCS 28
#define NUM_SINR 100
#define NUM_SINR 100
#define NUM_BLER_COL 13
#define NUM_BLER_COL 13
#define LTE_NUM_LAYER 1
// this mutex is used to set multiple UE's UL value in L2 FAPI simulator.
// this mutex is used to set multiple UE's UL value in L2 FAPI simulator.
extern
FILL_UL_INFO_MUTEX_t
fill_ul_mutex
;
extern
FILL_UL_INFO_MUTEX_t
fill_ul_mutex
;
...
@@ -126,7 +127,9 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
...
@@ -126,7 +127,9 @@ void handle_nfapi_ul_pdu_UE_MAC(module_id_t Mod_id,
typedef
struct
phy_channel_params_t
typedef
struct
phy_channel_params_t
{
{
uint16_t
sfn_sf
;
uint16_t
sfn_sf
;
float
sinr
;
uint16_t
message_id
;
uint16_t
nb_of_sinrs
;
float
sinr
[
LTE_NUM_LAYER
];
// Incomplete, need all channel parameters
// Incomplete, need all channel parameters
}
phy_channel_params_t
;
}
phy_channel_params_t
;
...
...
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