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
ZhouShuya
OpenXG-RAN
Commits
e96dfd4b
Commit
e96dfd4b
authored
Sep 06, 2019
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding PHY side of FAPI UL handling
parent
7fb14ab3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
25 deletions
+71
-25
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+0
-23
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
+52
-1
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+6
-1
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+13
-0
No files found.
openair1/PHY/INIT/nr_init.c
View file @
e96dfd4b
...
...
@@ -507,31 +507,8 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
exit
(
-
1
);
}
LOG_I
(
PHY
,
"Initializing nFAPI for ULSCH, UE %d
\n
"
,
i
);
// [hna] added here for RT implementation
uint8_t
harq_pid
=
0
;
nfapi_nr_ul_config_ulsch_pdu
*
rel15_ul
=
&
gNB
->
ulsch
[
i
+
1
][
j
]
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
// --------- setting rel15_ul parameters ----------
rel15_ul
->
rnti
=
0x1234
;
rel15_ul
->
ulsch_pdu_rel15
.
start_rb
=
30
;
rel15_ul
->
ulsch_pdu_rel15
.
number_rbs
=
50
;
rel15_ul
->
ulsch_pdu_rel15
.
start_symbol
=
2
;
rel15_ul
->
ulsch_pdu_rel15
.
number_symbols
=
12
;
rel15_ul
->
ulsch_pdu_rel15
.
nb_re_dmrs
=
6
;
rel15_ul
->
ulsch_pdu_rel15
.
length_dmrs
=
1
;
rel15_ul
->
ulsch_pdu_rel15
.
Qm
=
2
;
rel15_ul
->
ulsch_pdu_rel15
.
mcs
=
9
;
rel15_ul
->
ulsch_pdu_rel15
.
rv
=
0
;
rel15_ul
->
ulsch_pdu_rel15
.
n_layers
=
1
;
///////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
}
// this is the transmission mode for the signalling channels
// this will be overwritten with the real transmission mode by the RRC once the UE is connected
//gNB->transmission_mode[i] = fp->nb_antenna_ports_gNB==1 ? 1 : 2;
}
gNB
->
dlsch_SI
=
new_gNB_dlsch
(
1
,
8
,
NSOFT
,
0
,
fp
,
cfg
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_tools.c
View file @
e96dfd4b
...
...
@@ -257,7 +257,7 @@ int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type) {
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
for
(
i
=
0
;
i
<
NUMBER_OF_NR_DLSCH_MAX
;
i
++
)
{
AssertFatal
(
gNB
->
dlsch
[
i
]
!=
NULL
,
"gNB->dlsch[%d] is null
\n
"
,
i
);
AssertFatal
(
gNB
->
dlsch
[
i
]
!=
NULL
,
"gNB->dlsch[%d][0] is null
\n
"
,
i
);
AssertFatal
(
gNB
->
dlsch
[
i
]
[
0
]
!=
NULL
,
"gNB->dlsch[%d][0] is null
\n
"
,
i
);
LOG_D
(
PHY
,
"searching for rnti %x : dlsch_index %d=> harq_mask %x, rnti %x, first_free_index %d
\n
"
,
rnti
,
i
,
gNB
->
dlsch
[
i
][
0
]
->
harq_mask
,
gNB
->
dlsch
[
i
][
0
]
->
rnti
,
first_free_index
);
if
((
gNB
->
dlsch
[
i
][
0
]
->
harq_mask
>
0
)
&&
(
gNB
->
dlsch
[
i
][
0
]
->
rnti
==
rnti
))
return
i
;
...
...
@@ -269,6 +269,26 @@ int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type) {
return
first_free_index
;
}
int16_t
find_nr_ulsch
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
)
{
uint16_t
i
;
int16_t
first_free_index
=-
1
;
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
for
(
i
=
0
;
i
<
NUMBER_OF_NR_ULSCH_MAX
;
i
++
)
{
AssertFatal
(
gNB
->
ulsch
[
i
]
!=
NULL
,
"gNB->ulsch[%d] is null
\n
"
,
i
);
AssertFatal
(
gNB
->
ulsch
[
i
][
0
]
!=
NULL
,
"gNB->ulsch[%d][0] is null
\n
"
,
i
);
LOG_D
(
PHY
,
"searching for rnti %x : ulsch_index %d=> harq_mask %x, rnti %x, first_free_index %d
\n
"
,
rnti
,
i
,
gNB
->
ulsch
[
i
][
0
]
->
harq_mask
,
gNB
->
ulsch
[
i
][
0
]
->
rnti
,
first_free_index
);
if
((
gNB
->
ulsch
[
i
][
0
]
->
harq_mask
>
0
)
&&
(
gNB
->
ulsch
[
i
][
0
]
->
rnti
==
rnti
))
return
i
;
else
if
((
gNB
->
ulsch
[
i
][
0
]
->
harq_mask
==
0
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
}
if
(
type
==
SEARCH_EXIST
)
return
-
1
;
if
(
first_free_index
!=
-
1
)
gNB
->
ulsch
[
first_free_index
][
0
]
->
rnti
=
0
;
return
first_free_index
;
}
void
nr_fill_dlsch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
...
...
@@ -290,3 +310,34 @@ void nr_fill_dlsch(PHY_VARS_gNB *gNB,
}
void
nr_fill_ulsch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_pusch_pdu_t
*
ulsch_pdu
)
{
int
ulsch_id
=
find_nr_dlsch
(
ulsch_pdu
->
rnti
,
gNB
,
SEARCH_EXIST
);
AssertFatal
(
(
ulsch_id
>=
0
)
&&
(
ulsch_id
<
NUMBER_OF_NR_ULSCH_MAX
),
"illegal or no ulsch_id found!!! rnti %04x ulsch_id %d
\n
"
,
ulsch_pdu
->
rnti
,
ulsch_id
);
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ulsch_id
][
0
];
NR_UL_gNB_HARQ_t
**
harq
=
ulsch
->
harq_processes
;
int
harq_pid
=
ulsch_pdu
->
pusch_data
.
harq_process_id
;
nfapi_nr_ul_config_ulsch_pdu
*
rel15_ul
=
&
harq
[
harq_pid
]
->
ulsch_pdu
;
LOG_I
(
PHY
,
"Initializing nFAPI for ULSCH, UE %d, harq_pid %d
\n
"
,
ulsch_id
,
harq_pid
);
//FK this is still a bad hack. We need to replace the L1 FAPI structures with the new scf ones as well.
rel15_ul
->
rnti
=
ulsch_pdu
->
rnti
;
rel15_ul
->
ulsch_pdu_rel15
.
start_rb
=
ulsch_pdu
->
rb_start
;
rel15_ul
->
ulsch_pdu_rel15
.
number_rbs
=
ulsch_pdu
->
rb_size
;
rel15_ul
->
ulsch_pdu_rel15
.
start_symbol
=
ulsch_pdu
->
start_symbol_index
;
rel15_ul
->
ulsch_pdu_rel15
.
number_symbols
=
ulsch_pdu
->
nr_of_symbols
;
rel15_ul
->
ulsch_pdu_rel15
.
nb_re_dmrs
=
6
;
//where should this come from?
rel15_ul
->
ulsch_pdu_rel15
.
length_dmrs
=
1
;
//where should this come from?
rel15_ul
->
ulsch_pdu_rel15
.
Qm
=
ulsch_pdu
->
qam_mod_order
;
rel15_ul
->
ulsch_pdu_rel15
.
mcs
=
ulsch_pdu
->
mcs_index
;
rel15_ul
->
ulsch_pdu_rel15
.
rv
=
ulsch_pdu
->
pusch_data
.
rv_index
;
rel15_ul
->
ulsch_pdu_rel15
.
n_layers
=
ulsch_pdu
->
nrOfLayers
;
}
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
e96dfd4b
...
...
@@ -190,4 +190,9 @@ void nr_ulsch_compute_llr(int32_t *rxdataF_comp,
uint32_t
nb_rb
,
uint32_t
nb_re
,
uint8_t
symbol
,
uint8_t
mod_order
);
\ No newline at end of file
uint8_t
mod_order
);
void
nr_fill_ulsch
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
nfapi_nr_pusch_pdu_t
*
ulsch_pdu
);
openair1/SCHED_NR/fapi_nr_l1.c
View file @
e96dfd4b
...
...
@@ -89,6 +89,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
uint8_t
CC_id
=
Sched_INFO
->
CC_id
;
nfapi_nr_dl_config_request_t
*
DL_req
=
Sched_INFO
->
DL_req
;
nfapi_tx_request_t
*
TX_req
=
Sched_INFO
->
TX_req
;
nfapi_nr_ul_tti_request_t
*
UL_tti_req
=
Sched_INFO
->
UL_tti_req
;
frame_t
frame
=
Sched_INFO
->
frame
;
sub_frame_t
slot
=
Sched_INFO
->
slot
;
...
...
@@ -99,6 +100,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
gNB
=
RC
.
gNB
[
Mod_id
][
CC_id
];
uint8_t
number_dl_pdu
=
DL_req
->
dl_config_request_body
.
number_pdu
;
uint8_t
number_ul_pdu
=
UL_tti_req
->
n_pdus
;
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
;
...
...
@@ -157,6 +159,17 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
}
}
for
(
i
=
0
;
i
<
number_ul_pdu
;
i
++
)
{
LOG_D
(
PHY
,
"NFAPI: dl_pdu %d : type %d
\n
"
,
i
,
UL_tti_req
->
pdus_list
[
i
].
pdu_type
);
switch
(
UL_tti_req
->
pdus_list
[
i
].
pdu_type
)
{
case
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
:
{
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
UL_tti_req
->
pdus_list
[
0
].
pusch_pdu
;
nr_fill_ulsch
(
gNB
,
frame
,
slot
,
pusch_pdu
);
}
}
}
if
(
nfapi_mode
&&
do_oai
&&
!
dont_send
)
{
oai_nfapi_tx_req
(
Sched_INFO
->
TX_req
);
...
...
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