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
79117d4c
Commit
79117d4c
authored
Nov 19, 2021
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_ULSCH_decoding' into integration_2021_wk46_c
parents
e8ce9a73
41e2b21d
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
125 additions
and
80 deletions
+125
-80
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+2
-0
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+19
-9
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+2
-0
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+3
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+8
-4
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+91
-67
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
79117d4c
...
...
@@ -16,6 +16,7 @@
#ifndef _FAPI_NR_UE_INTERFACE_H_
#define _FAPI_NR_UE_INTERFACE_H_
#include <pthread.h>
#include "stddef.h"
#include "platform_types.h"
...
...
@@ -349,6 +350,7 @@ typedef struct {
uint16_t
slot
;
uint8_t
number_pdus
;
fapi_nr_ul_config_request_pdu_t
ul_config_list
[
FAPI_NR_UL_CONFIG_LIST_NUM
];
pthread_mutex_t
mutex_ul_config
;
}
fapi_nr_ul_config_request_t
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
79117d4c
...
...
@@ -153,6 +153,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
fapi_nr_ul_config_request_t
*
ul_config
=
scheduled_response
->
ul_config
;
pthread_mutex_lock
(
&
ul_config
->
mutex_ul_config
);
for
(
i
=
0
;
i
<
ul_config
->
number_pdus
;
++
i
){
AssertFatal
(
ul_config
->
ul_config_list
[
i
].
pdu_type
<=
FAPI_NR_UL_CONFIG_TYPES
,
"pdu_type %d out of bounds
\n
"
,
ul_config
->
ul_config_list
[
i
].
pdu_type
);
...
...
@@ -174,6 +175,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
pusch_config_pdu
=
&
ul_config
->
ul_config_list
[
i
].
pusch_config_pdu
;
current_harq_pid
=
pusch_config_pdu
->
pusch_data
.
harq_process_id
;
NR_UL_UE_HARQ_t
*
harq_process_ul_ue
=
ulsch0
->
harq_processes
[
current_harq_pid
];
harq_process_ul_ue
->
status
=
0
;
if
(
harq_process_ul_ue
){
...
...
@@ -183,14 +185,16 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
ulsch0
->
f_pusch
=
pusch_config_pdu
->
absolute_delta_PUSCH
;
if
(
scheduled_response
->
tx_request
){
fapi_nr_tx_request_body_t
*
tx_req_body
=
&
scheduled_response
->
tx_request
->
tx_request_body
[
i
];
LOG_D
(
PHY
,
"%d.%d Copying %d bytes to harq_process_ul_ue->a (harq_pid %d)
\n
"
,
scheduled_response
->
frame
,
slot
,
tx_req_body
->
pdu_length
,
current_harq_pid
);
memcpy
(
harq_process_ul_ue
->
a
,
tx_req_body
->
pdu
,
tx_req_body
->
pdu_length
);
harq_process_ul_ue
->
status
=
ACTIVE
;
scheduled_response
->
tx_request
->
number_of_pdus
=
0
;
if
(
scheduled_response
->
tx_request
)
{
for
(
int
j
=
0
;
j
<
scheduled_response
->
tx_request
->
number_of_pdus
;
j
++
)
{
fapi_nr_tx_request_body_t
*
tx_req_body
=
&
scheduled_response
->
tx_request
->
tx_request_body
[
j
];
if
(
tx_req_body
->
pdu_index
==
i
)
{
LOG_D
(
PHY
,
"%d.%d Copying %d bytes to harq_process_ul_ue->a (harq_pid %d)
\n
"
,
scheduled_response
->
frame
,
slot
,
tx_req_body
->
pdu_length
,
current_harq_pid
);
memcpy
(
harq_process_ul_ue
->
a
,
tx_req_body
->
pdu
,
tx_req_body
->
pdu_length
);
harq_process_ul_ue
->
status
=
ACTIVE
;
break
;
}
}
}
}
else
{
...
...
@@ -228,7 +232,13 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
break
;
}
}
memset
(
ul_config
,
0
,
sizeof
(
fapi_nr_ul_config_request_t
));
if
(
scheduled_response
->
tx_request
)
scheduled_response
->
tx_request
->
number_of_pdus
=
0
;
ul_config
->
sfn
=
0
;
ul_config
->
slot
=
0
;
ul_config
->
number_pdus
=
0
;
memset
(
ul_config
->
ul_config_list
,
0
,
sizeof
(
ul_config
->
ul_config_list
));
pthread_mutex_unlock
(
&
ul_config
->
mutex_ul_config
);
}
}
return
0
;
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
79117d4c
...
...
@@ -660,6 +660,8 @@ int nr_rrc_mac_config_req_ue(
if
(
mac
->
scc_SIB
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
>
0
)
num_slots_ul
++
;
LOG_I
(
MAC
,
"Initializing ul_config_request. num_slots_ul = %d
\n
"
,
num_slots_ul
);
mac
->
ul_config_request
=
(
fapi_nr_ul_config_request_t
*
)
calloc
(
num_slots_ul
,
sizeof
(
fapi_nr_ul_config_request_t
));
for
(
int
i
=
0
;
i
<
num_slots_ul
;
i
++
)
pthread_mutex_init
(
&
(
mac
->
ul_config_request
[
i
].
mutex_ul_config
),
NULL
);
// Setup the SSB to Rach Occasions mapping according to the config
build_ssb_to_ro_map
(
mac
);
//->scc, mac->phy_config.config_req.cell_config.frame_duplex_type);
mac
->
if_module
->
phy_config_request
(
&
mac
->
phy_config
);
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
79117d4c
...
...
@@ -40,6 +40,7 @@
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "executables/softmodem-common.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp.h"
#include <pthread.h>
static
NR_UE_MAC_INST_t
*
nr_ue_mac_inst
;
...
...
@@ -74,6 +75,8 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) {
num_slots_ul
++
;
LOG_D
(
MAC
,
"Initializing ul_config_request. num_slots_ul = %d
\n
"
,
num_slots_ul
);
nr_ue_mac_inst
->
ul_config_request
=
(
fapi_nr_ul_config_request_t
*
)
calloc
(
num_slots_ul
,
sizeof
(
fapi_nr_ul_config_request_t
));
for
(
int
i
=
0
;
i
<
num_slots_ul
;
i
++
)
pthread_mutex_init
(
&
(
nr_ue_mac_inst
->
ul_config_request
[
i
].
mutex_ul_config
),
NULL
);
}
}
else
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
79117d4c
...
...
@@ -668,15 +668,15 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
LOG_W
(
MAC
,
"In %s: ul_config request is NULL. Probably due to unexpected UL DCI in frame.slot %d.%d. Ignoring DCI!
\n
"
,
__FUNCTION__
,
frame
,
slot
);
return
-
1
;
}
pthread_mutex_lock
(
&
ul_config
->
mutex_ul_config
);
AssertFatal
(
ul_config
->
number_pdus
<
FAPI_NR_UL_CONFIG_LIST_NUM
,
"ul_config->number_pdus %d out of bounds
\n
"
,
ul_config
->
number_pdus
);
nfapi_nr_ue_pusch_pdu_t
*
pusch_config_pdu
=
&
ul_config
->
ul_config_list
[
ul_config
->
number_pdus
].
pusch_config_pdu
;
fill_ul_config
(
ul_config
,
frame_tx
,
slot_tx
,
FAPI_NR_UL_CONFIG_TYPE_PUSCH
);
pthread_mutex_unlock
(
&
ul_config
->
mutex_ul_config
);
// Config PUSCH PDU
ret
=
nr_config_pusch_pdu
(
mac
,
pusch_config_pdu
,
dci
,
NULL
,
rnti
,
&
dci_format
);
}
break
;
...
...
@@ -729,13 +729,15 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
return
-
1
;
}
pthread_mutex_lock
(
&
ul_config
->
mutex_ul_config
);
AssertFatal
(
ul_config
->
number_pdus
<
FAPI_NR_UL_CONFIG_LIST_NUM
,
"ul_config->number_pdus %d out of bounds
\n
"
,
ul_config
->
number_pdus
);
nfapi_nr_ue_pusch_pdu_t
*
pusch_config_pdu
=
&
ul_config
->
ul_config_list
[
ul_config
->
number_pdus
].
pusch_config_pdu
;
fill_ul_config
(
ul_config
,
frame_tx
,
slot_tx
,
FAPI_NR_UL_CONFIG_TYPE_PUSCH
);
pthread_mutex_unlock
(
&
ul_config
->
mutex_ul_config
);
// Config PUSCH PDU
ret
=
nr_config_pusch_pdu
(
mac
,
pusch_config_pdu
,
dci
,
NULL
,
rnti
,
&
dci_format
);
}
else
AssertFatal
(
1
==
0
,
"Cannot schedule PUSCH
\n
"
);
break
;
}
...
...
@@ -3921,13 +3923,15 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t
rnti
=
ra
->
t_crnti
;
}
pthread_mutex_lock
(
&
ul_config
->
mutex_ul_config
);
AssertFatal
(
ul_config
->
number_pdus
<
FAPI_NR_UL_CONFIG_LIST_NUM
,
"ul_config->number_pdus %d out of bounds
\n
"
,
ul_config
->
number_pdus
);
nfapi_nr_ue_pusch_pdu_t
*
pusch_config_pdu
=
&
ul_config
->
ul_config_list
[
ul_config
->
number_pdus
].
pusch_config_pdu
;
fill_ul_config
(
ul_config
,
frame_tx
,
slot_tx
,
FAPI_NR_UL_CONFIG_TYPE_PUSCH
);
pthread_mutex_unlock
(
&
ul_config
->
mutex_ul_config
);
// Config Msg3 PDU
nr_config_pusch_pdu
(
mac
,
pusch_config_pdu
,
NULL
,
&
rar_grant
,
rnti
,
NULL
);
}
}
else
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
79117d4c
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