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
alex037yang
OpenXG-RAN
Commits
3c4d3ef9
Commit
3c4d3ef9
authored
Aug 06, 2018
by
yilmazt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nr_pdcch' of
https://gitlab.eurecom.fr/oai/openairinterface5g
into nr_pdcch
parents
56448ab7
a24e5b1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
10 deletions
+32
-10
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
+18
-9
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+14
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
View file @
3c4d3ef9
...
@@ -43,11 +43,11 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
...
@@ -43,11 +43,11 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
uint32_t
*
dci_pdu
=
dci_alloc
->
dci_pdu
;
uint32_t
*
dci_pdu
=
dci_alloc
->
dci_pdu
;
nfapi_nr_dl_config_dci_dl_pdu_rel15_t
*
pdu_rel15
=
&
pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel15
;
nfapi_nr_dl_config_dci_dl_pdu_rel15_t
*
pdu_rel15
=
&
pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel15
;
nfapi_nr_dl_config_pdcch_parameters_rel15_t
*
params_rel15
=
&
pdu
->
dci_dl_pdu
.
pdcch_params_rel15
;
nfapi_nr_dl_config_pdcch_parameters_rel15_t
*
params_rel15
=
&
pdu
->
dci_dl_pdu
.
pdcch_params_rel15
;
nfapi_nr_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
nfapi_nr_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
uint16_t
N_RB
=
fp
->
initial_bwp_dl
.
N_RB
;
uint16_t
N_RB
=
fp
->
initial_bwp_dl
.
N_RB
;
uint8_t
fsize
=
0
;
uint8_t
fsize
=
0
,
pos
=
0
;
/// Payload generation
/// Payload generation
switch
(
params_rel15
->
dci_format
)
{
switch
(
params_rel15
->
dci_format
)
{
...
@@ -59,15 +59,22 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
...
@@ -59,15 +59,22 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
fsize
=
(
int
)
ceil
(
log2
(
(
N_RB
*
(
N_RB
+
1
))
>>
1
)
);
fsize
=
(
int
)
ceil
(
log2
(
(
N_RB
*
(
N_RB
+
1
))
>>
1
)
);
for
(
int
i
=
0
;
i
<
fsize
;
i
++
)
for
(
int
i
=
0
;
i
<
fsize
;
i
++
)
*
dci_pdu
|=
((
pdu_rel15
->
frequency_domain_assignment
>>
(
fsize
-
i
))
&
1
)
<<
i
;
*
dci_pdu
|=
((
pdu_rel15
->
frequency_domain_assignment
>>
(
fsize
-
i
))
&
1
)
<<
i
;
pos
+=
fsize
;
// VRB to PRB mapping
*
dci_pdu
|=
(
pdu_rel15
->
vrb_to_prb_mapping
&
1
)
<<
pos
;
pos
++
;
// Time domain assignment
// Time domain assignment
for
(
int
i
=
0
;
i
<
4
;
i
++
)
for
(
int
i
=
0
;
i
<
4
;
i
++
)
*
dci_pdu
|=
((
pdu_rel15
->
time_domain_assignment
>>
(
4
-
i
))
&
1
)
<<
i
;
*
dci_pdu
|=
((
pdu_rel15
->
time_domain_assignment
>>
(
4
-
i
))
&
1
)
<<
(
pos
+
i
);
pos
+=
4
;
//MCS
//MCS
for
(
int
i
=
0
;
i
<
5
;
i
++
)
for
(
int
i
=
0
;
i
<
5
;
i
++
)
*
dci_pdu
|=
((
pdu_rel15
->
mcs
>>
(
5
-
i
))
&
1
)
<<
i
;
*
dci_pdu
|=
((
pdu_rel15
->
mcs
>>
(
5
-
i
))
&
1
)
<<
(
pos
+
i
);
pos
+=
5
;
// TB scaling
// TB scaling
for
(
int
i
=
0
;
i
<
2
;
i
++
)
for
(
int
i
=
0
;
i
<
2
;
i
++
)
*
dci_pdu
|=
((
pdu_rel15
->
tb_scaling
>>
(
2
-
i
))
&
1
)
<<
i
;
*
dci_pdu
|=
((
pdu_rel15
->
tb_scaling
>>
(
2
-
i
))
&
1
)
<<
(
pos
+
i
);
break
;
break
;
}
}
...
@@ -77,15 +84,16 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
...
@@ -77,15 +84,16 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
break
;
break
;
}
}
LOG_I
(
MAC
,
"DCI PDU: [0]->0x%08x
\t
[0]->0x%08x
[1]->0x%08x
\t
[2]->0x%08x
\t
[3]->0x%08x
\n
"
,
LOG_I
(
PHY
,
"DCI PDU: [0]->0x%08x
\t
[1]->0x%08x
\t
[2]->0x%08x
\t
[3]->0x%08x
\n
"
,
dci_pdu
[
0
],
dci_pdu
[
1
],
dci_pdu
[
2
],
dci_pdu
[
3
]);
dci_pdu
[
0
],
dci_pdu
[
1
],
dci_pdu
[
2
],
dci_pdu
[
3
]);
/// rest of DCI alloc
/// rest of DCI alloc
memcpy
((
void
*
)
&
dci_alloc
->
pdcch_params
,
(
void
*
)
params_rel15
,
sizeof
(
nfapi_nr_dl_config_pdcch_parameters_rel15_t
));
memcpy
((
void
*
)
&
dci_alloc
->
pdcch_params
,
(
void
*
)
params_rel15
,
sizeof
(
nfapi_nr_dl_config_pdcch_parameters_rel15_t
));
dci_alloc
->
size
=
nr_get_dci_size
(
NFAPI_NR_DL_DCI_FORMAT_1_0
,
dci_alloc
->
size
=
nr_get_dci_size
(
dci_alloc
->
pdcch_params
.
dci_format
,
NFAPI_NR_RNTI_RA
,
dci_alloc
->
pdcch_params
.
rnti_type
,
&
fp
->
initial_bwp_dl
,
&
fp
->
initial_bwp_dl
,
cfg
);
cfg
);
LOG_I
(
PHY
,
"DCI type %d payload (size %d) generated
\n
"
,
dci_alloc
->
pdcch_params
.
dci_format
,
dci_alloc
->
size
);
...
@@ -134,3 +142,4 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
...
@@ -134,3 +142,4 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
return
;
return
;
}
}
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
3c4d3ef9
...
@@ -45,6 +45,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
...
@@ -45,6 +45,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
NR_COMMON_channels_t
*
cc
=
nr_mac
->
common_channels
;
NR_COMMON_channels_t
*
cc
=
nr_mac
->
common_channels
;
nfapi_nr_dl_config_request_body_t
*
dl_req
;
nfapi_nr_dl_config_request_body_t
*
dl_req
;
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
;
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
;
nfapi_tx_request_pdu_t
*
TX_req
;
uint16_t
sfn_sf
=
frameP
<<
4
|
subframeP
;
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
LOG_I
(
MAC
,
"Scheduling common search space DCI type 1 for CC_id %d
\n
"
,
CC_id
);
LOG_I
(
MAC
,
"Scheduling common search space DCI type 1 for CC_id %d
\n
"
,
CC_id
);
...
@@ -72,7 +74,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
...
@@ -72,7 +74,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
pdu_rel15
->
time_domain_assignment
=
2
;
pdu_rel15
->
time_domain_assignment
=
2
;
pdu_rel15
->
vrb_to_prb_mapping
=
0
;
pdu_rel15
->
vrb_to_prb_mapping
=
0
;
pdu_rel15
->
tb_scaling
=
1
;
pdu_rel15
->
tb_scaling
=
1
;
LOG_I
(
MAC
,
"DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, tb_scaling %d
\n
"
,
LOG_I
(
MAC
,
"
[gNB scheduler phytest]
DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, tb_scaling %d
\n
"
,
pdu_rel15
->
frequency_domain_assignment
,
pdu_rel15
->
frequency_domain_assignment
,
pdu_rel15
->
time_domain_assignment
,
pdu_rel15
->
time_domain_assignment
,
pdu_rel15
->
vrb_to_prb_mapping
,
pdu_rel15
->
vrb_to_prb_mapping
,
...
@@ -100,6 +102,17 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
...
@@ -100,6 +102,17 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
params_rel15
->
first_slot
);
params_rel15
->
first_slot
);
dl_req
->
number_dci
++
;
dl_req
->
number_dci
++
;
dl_req
->
number_pdu
++
;
dl_req
->
number_pdu
++
;
TX_req
=
&
nr_mac
->
TX_req
[
CC_id
].
tx_request_body
.
tx_pdu_list
[
nr_mac
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
];
TX_req
->
pdu_length
=
6
;
TX_req
->
pdu_index
=
nr_mac
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_segments
=
1
;
TX_req
->
segments
[
0
].
segment_length
=
8
;
//TX_req->segments[0].segment_data = (uint8_t*)pdu_rel15;
nr_mac
->
TX_req
[
CC_id
].
tx_request_body
.
number_of_pdus
++
;
nr_mac
->
TX_req
[
CC_id
].
sfn_sf
=
sfn_sf
;
nr_mac
->
TX_req
[
CC_id
].
tx_request_body
.
tl
.
tag
=
NFAPI_TX_REQUEST_BODY_TAG
;
nr_mac
->
TX_req
[
CC_id
].
header
.
message_id
=
NFAPI_TX_REQUEST
;
}
}
}
}
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