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
spbro
OpenXG-RAN
Commits
78341d9d
Commit
78341d9d
authored
4 years ago
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated bler table lookup mechanism and logs
parent
02571e63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+14
-6
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-1
No files found.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
78341d9d
...
@@ -1321,7 +1321,7 @@ void *ue_standalone_pnf_task(void *context)
...
@@ -1321,7 +1321,7 @@ void *ue_standalone_pnf_task(void *context)
abort
();
abort
();
}
}
sf_rnti_mcs
[
sf
].
sinr
=
ch_info
->
sinr
;
sf_rnti_mcs
[
sf
].
sinr
=
ch_info
->
sinr
;
LOG_
A
(
MAC
,
"Received_SINR = %f
\n
"
,
ch_info
->
sinr
);
LOG_
D
(
MAC
,
"Received_SINR = %f
\n
"
,
ch_info
->
sinr
);
}
}
else
else
{
{
...
@@ -2050,15 +2050,20 @@ static bool did_drop_transport_block(int sf, uint16_t rnti)
...
@@ -2050,15 +2050,20 @@ static bool did_drop_transport_block(int sf, uint16_t rnti)
static
float
get_bler_val
(
uint8_t
mcs
,
int
sinr
)
static
float
get_bler_val
(
uint8_t
mcs
,
int
sinr
)
{
{
// 4th col = dropped packets, 5th col = total packets
float
bler_val
=
0
.
0
;
CHECK_INDEX
(
bler_data
,
mcs
);
if
(
sinr
<
(
int
)(
bler_data
[
mcs
].
bler_table
[
0
][
0
]
*
10
))
if
(
sinr
<
(
int
)(
bler_data
[
mcs
].
bler_table
[
0
][
0
]
*
10
))
{
{
LOG_I
(
MAC
,
"MCS %d table. SINR is smaller than lowest SINR, bler_val is set based on lowest SINR in table
\n
"
,
mcs
);
LOG_I
(
MAC
,
"MCS %d table. SINR is smaller than lowest SINR, bler_val is set based on lowest SINR in table
\n
"
,
mcs
);
return
bler_data
[
mcs
].
bler_table
[
0
][
3
];
bler_val
=
bler_data
[
mcs
].
bler_table
[
0
][
4
]
/
bler_data
[
mcs
].
bler_table
[
0
][
5
];
return
bler_val
;
}
}
if
(
sinr
>
(
int
)(
bler_data
[
mcs
].
bler_table
[
bler_data
[
mcs
].
length
-
1
][
0
]
*
10
))
if
(
sinr
>
(
int
)(
bler_data
[
mcs
].
bler_table
[
bler_data
[
mcs
].
length
-
1
][
0
]
*
10
))
{
{
LOG_I
(
MAC
,
"MCS %d table. SINR is greater than largest SINR. bler_val is set based on largest SINR in table
\n
"
,
mcs
);
LOG_I
(
MAC
,
"MCS %d table. SINR is greater than largest SINR. bler_val is set based on largest SINR in table
\n
"
,
mcs
);
return
bler_data
[
mcs
].
bler_table
[(
bler_data
[
mcs
].
length
-
1
)][
3
];
bler_val
=
bler_data
[
mcs
].
bler_table
[(
bler_data
[
mcs
].
length
-
1
)][
4
]
/
bler_data
[
mcs
].
bler_table
[(
bler_data
[
mcs
].
length
-
1
)][
5
];
return
bler_val
;
}
}
// Loop through bler table to find sinr_index
// Loop through bler table to find sinr_index
for
(
int
i
=
0
;
i
<
bler_data
[
mcs
].
length
;
i
++
)
for
(
int
i
=
0
;
i
<
bler_data
[
mcs
].
length
;
i
++
)
...
@@ -2066,12 +2071,15 @@ static float get_bler_val(uint8_t mcs, int sinr)
...
@@ -2066,12 +2071,15 @@ static float get_bler_val(uint8_t mcs, int sinr)
int
temp_sinr
=
(
int
)(
bler_data
[
mcs
].
bler_table
[
i
][
0
]
*
10
);
int
temp_sinr
=
(
int
)(
bler_data
[
mcs
].
bler_table
[
i
][
0
]
*
10
);
if
(
temp_sinr
==
sinr
)
if
(
temp_sinr
==
sinr
)
{
{
return
bler_data
[
mcs
].
bler_table
[
i
][
3
];
// 3rd column containers bler value
bler_val
=
bler_data
[
mcs
].
bler_table
[
i
][
4
]
/
bler_data
[
mcs
].
bler_table
[
i
][
5
];
return
bler_val
;
}
}
// Linear interpolation when SINR is between indices
// Linear interpolation when SINR is between indices
if
(
temp_sinr
>
sinr
)
if
(
temp_sinr
>
sinr
)
{
{
return
((
bler_data
[
mcs
].
bler_table
[
i
-
1
][
3
]
+
bler_data
[
mcs
].
bler_table
[
i
][
3
])
/
2
);
float
bler_val1
=
bler_data
[
mcs
].
bler_table
[
i
-
1
][
4
]
/
bler_data
[
mcs
].
bler_table
[
i
-
1
][
5
];
float
bler_val2
=
bler_data
[
mcs
].
bler_table
[
i
][
4
]
/
bler_data
[
mcs
].
bler_table
[
i
][
5
];
return
((
bler_val1
+
bler_val2
)
/
2
);
}
}
}
}
LOG_E
(
MAC
,
"NO SINR INDEX FOUND!
\n
"
);
LOG_E
(
MAC
,
"NO SINR INDEX FOUND!
\n
"
);
...
@@ -2107,7 +2115,7 @@ static bool should_drop_transport_block(int sf, uint16_t rnti)
...
@@ -2107,7 +2115,7 @@ static bool should_drop_transport_block(int sf, uint16_t rnti)
float
bler_val
=
get_bler_val
(
mcs
,
((
int
)(
sf_rnti_mcs
[
sf
].
sinr
*
10
)));
float
bler_val
=
get_bler_val
(
mcs
,
((
int
)(
sf_rnti_mcs
[
sf
].
sinr
*
10
)));
double
drop_cutoff
=
((
double
)
rand
()
/
(
RAND_MAX
));
double
drop_cutoff
=
((
double
)
rand
()
/
(
RAND_MAX
));
assert
(
drop_cutoff
<=
1
);
assert
(
drop_cutoff
<=
1
);
LOG_I
(
MAC
,
"SINR = %f, Bler_val = %f, MCS = %"
PRIu8
"
\n
"
,
sf_rnti_mcs
[
sf
].
sinr
,
bler_val
,
sf_rnti_mcs
[
sf
].
mcs
[
n
]);
if
(
drop_cutoff
<=
bler_val
)
if
(
drop_cutoff
<=
bler_val
)
{
{
sf_rnti_mcs
[
sf
].
drop_flag
[
n
]
=
true
;
sf_rnti_mcs
[
sf
].
drop_flag
[
n
]
=
true
;
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
78341d9d
...
@@ -1112,7 +1112,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
...
@@ -1112,7 +1112,7 @@ static void *UE_phy_stub_standalone_pnf_task(void *arg)
nfapi_dl_config_request_t
*
dl_config_req
=
dl_config_req_tx_req
->
dl_config_req
;
nfapi_dl_config_request_t
*
dl_config_req
=
dl_config_req_tx_req
->
dl_config_req
;
uint16_t
dl_num_pdus
=
dl_config_req
->
dl_config_request_body
.
number_pdu
;
uint16_t
dl_num_pdus
=
dl_config_req
->
dl_config_request_body
.
number_pdu
;
LOG_
A
(
MAC
,
"(OAI UE) Received dl_config_req from proxy at Frame: %d, Subframe: %d,"
LOG_
I
(
MAC
,
"(OAI UE) Received dl_config_req from proxy at Frame: %d, Subframe: %d,"
" with number of PDUs: %u
\n
"
,
" with number of PDUs: %u
\n
"
,
NFAPI_SFNSF2SFN
(
dl_config_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
dl_config_req
->
sfn_sf
),
NFAPI_SFNSF2SFN
(
dl_config_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
dl_config_req
->
sfn_sf
),
dl_num_pdus
);
dl_num_pdus
);
...
...
This diff is collapsed.
Click to expand it.
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