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
952ccec1
Commit
952ccec1
authored
Oct 25, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scheduler corrections
parent
b0b5068e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
32 deletions
+49
-32
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
+1
-7
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+3
-3
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+3
-4
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
+3
-5
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+8
-3
openair1/SCHED_NR/fapi_nr_l1.h
openair1/SCHED_NR/fapi_nr_l1.h
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+29
-9
No files found.
openair1/PHY/NR_TRANSPORT/nr_dci_tools.c
View file @
952ccec1
...
...
@@ -62,7 +62,7 @@ void nr_fill_cce_list(NR_gNB_DCI_ALLOC_t* dci_alloc, uint16_t n_shift, uint8_t m
AssertFatal
(
cond
==
0
,
"CCE to REG interleaving: Invalid configuration leading to non integer C
\n
"
);
C
=
N_reg
/
(
bsize
*
R
);
tmp
=
L
*
((
Y
+
(
uint16_t
)(
floor
((
m
*
N_cce
)
/
(
L
*
M_s_max
)))
+
n_CI
)
%
((
uint16_t
)
floor
(
N_cce
/
L
)
));
tmp
=
L
*
((
Y
+
(
m
*
N_cce
)
/
(
L
*
M_s_max
)
+
n_CI
)
%
(
N_cce
/
L
));
LOG_I
(
PHY
,
"CCE list generation for candidate %d: bundle size %d ilv size %d tmp %d
\n
"
,
m
,
bsize
,
R
,
tmp
);
for
(
uint8_t
cce_idx
=
0
;
cce_idx
<
L
;
cce_idx
++
)
{
...
...
@@ -162,8 +162,6 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
for
(
int
i
=
0
;
i
<
fsize
;
i
++
)
*
dci_pdu
|=
((
pdu_rel15
->
frequency_domain_assignment
>>
(
fsize
-
i
-
1
))
&
1
)
<<
pos
++
;
printf
(
"fsize = %d
\n
"
,
fsize
);
printf
(
"NFAPI_NR_RNTI_C
\n
"
);
if
((
pdu_rel15
->
frequency_domain_assignment
+
1
)
&
1
==
0
)
//fsize are all 1 38.212 p86
{
printf
(
"***************************
\n
"
);
...
...
@@ -536,9 +534,5 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB,
/// DLSCH struct
memcpy
((
void
*
)
&
dlsch
->
harq_processes
[
dci_alloc
->
harq_pid
]
->
dlsch_pdu
,
(
void
*
)
dlsch_pdu
,
sizeof
(
nfapi_nr_dl_config_dlsch_pdu
));
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_rel15
=
&
dlsch_pdu
->
dlsch_pdu_rel15
;
nr_get_tbs
(
dlsch
,
*
pdcch_pdu
,
*
cfg
,
dci_alloc
->
harq_pid
);
dlsch_rel15
->
nb_layers
=
1
;
dlsch_rel15
->
nb_codewords
=
1
;
}
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
952ccec1
...
...
@@ -39,7 +39,7 @@
uint8_t
mod_order
[
5
]
=
{
1
,
2
,
4
,
6
,
8
};
uint16_t
mod_offset
[
5
]
=
{
1
,
3
,
7
,
23
,
87
};
void
nr_pdsch_codeword_scrambling
(
uint
32
_t
*
in
,
void
nr_pdsch_codeword_scrambling
(
uint
8
_t
*
in
,
uint8_t
size
,
uint8_t
q
,
uint32_t
Nid
,
...
...
@@ -57,7 +57,7 @@ void nr_pdsch_codeword_scrambling(uint32_t *in,
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
*
out
^=
((
(
*
in
)
>>
i
)
&
1
)
^
((
s
>>
i
)
&
1
);
*
out
^=
((
in
[
i
]
)
&
1
)
^
((
s
>>
i
)
&
1
);
}
}
...
...
@@ -201,7 +201,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
delta
;
/// CRC, coding, interleaving and rate matching
nr_dlsch_encoding
(
0
,
subframe
,
&
dlsch
,
&
frame_parms
);
nr_dlsch_encoding
(
harq
->
pdu
,
subframe
,
&
dlsch
,
&
frame_parms
);
/// scrambling
uint16_t
n_RNTI
=
(
pdcch_params
.
search_space_type
==
NFAPI_NR_SEARCH_SPACE_TYPE_UE_SPECIFIC
)
?
\
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
952ccec1
...
...
@@ -56,12 +56,11 @@ uint8_t nr_get_Qm(uint8_t Imcs, uint8_t table_idx);
uint32_t
nr_get_code_rate
(
uint8_t
Imcs
,
uint8_t
table_idx
);
void
nr_get_tbs
(
NR_gNB_DLSCH_t
*
dlsch
,
void
nr_get_tbs
(
nfapi_nr_dl_config_dlsch_pdu
*
dlsch_pdu
,
nfapi_nr_dl_config_dci_dl_pdu
dci_pdu
,
nfapi_nr_config_request_t
config
,
uint8_t
harq_pid
);
nfapi_nr_config_request_t
config
);
void
nr_pdsch_codeword_scrambling
(
uint
32
_t
*
in
,
void
nr_pdsch_codeword_scrambling
(
uint
8
_t
*
in
,
uint8_t
size
,
uint8_t
q
,
uint32_t
Nid
,
...
...
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
View file @
952ccec1
...
...
@@ -103,14 +103,12 @@ static inline uint8_t get_table_idx(uint8_t mcs_table, uint8_t dci_format, uint8
return
1
;
}
void
nr_get_tbs
(
NR_gNB_DLSCH_t
*
dlsch
,
void
nr_get_tbs
(
nfapi_nr_dl_config_dlsch_pdu
*
dlsch_pdu
,
nfapi_nr_dl_config_dci_dl_pdu
dci_pdu
,
nfapi_nr_config_request_t
config
,
uint8_t
harq_pid
)
{
nfapi_nr_config_request_t
config
)
{
nfapi_nr_dl_config_pdcch_parameters_rel15_t
params_rel15
=
dci_pdu
.
pdcch_params_rel15
;
NR_DL_gNB_HARQ_t
*
harq
=
dlsch
->
harq_processes
[
harq_pid
];
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_rel15
=
&
harq
->
dlsch_pdu
.
dlsch_pdu_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_rel15
=
&
dlsch_pdu
->
dlsch_pdu_rel15
;
uint8_t
rnti_type
=
params_rel15
.
rnti_type
;
uint8_t
dci_format
=
params_rel15
.
dci_format
;
uint8_t
ss_type
=
params_rel15
.
search_space_type
;
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
952ccec1
...
...
@@ -57,7 +57,8 @@ void handle_nr_nfapi_bch_pdu(PHY_VARS_gNB *gNB,
void
handle_nfapi_nr_dci_dl_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
subframe
,
gNB_rxtx_proc_t
*
proc
,
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
)
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
,
nfapi_nr_dl_config_request_pdu_t
*
dl_config_dlsch_pdu
)
{
int
idx
=
subframe
&
1
;
NR_gNB_PDCCH
*
pdcch_vars
=
&
gNB
->
pdcch_vars
;
...
...
@@ -65,7 +66,7 @@ void handle_nfapi_nr_dci_dl_pdu(PHY_VARS_gNB *gNB,
LOG_D
(
PHY
,
"Frame %d, Subframe %d: DCI processing - populating pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d
\n
"
,
frame
,
subframe
,
pdcch_vars
->
num_dci
,
proc
->
subframe_tx
,
idx
,
pdcch_vars
->
num_dci
);
// copy dci configuration into gNB structure
nr_fill_dci_and_dlsch
(
gNB
,
frame
,
subframe
,
proc
,
&
pdcch_vars
->
dci_alloc
[
pdcch_vars
->
num_dci
],
&
dl_config_pdu
->
dci_dl_pdu
,
&
dl_config_pdu
->
dlsch_pdu
);
nr_fill_dci_and_dlsch
(
gNB
,
frame
,
subframe
,
proc
,
&
pdcch_vars
->
dci_alloc
[
pdcch_vars
->
num_dci
],
&
dl_config_pdu
->
dci_dl_pdu
,
&
dl_config_
dlsch_
pdu
->
dlsch_pdu
);
LOG_D
(
PHY
,
"Frame %d, Subframe %d: DCI processing - populated pdcch_vars->dci_alloc[%d] proc:subframe_tx:%d idx:%d pdcch_vars->num_dci:%d
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
,
pdcch_vars
->
num_dci
,
proc
->
subframe_tx
,
idx
,
pdcch_vars
->
num_dci
);
}
...
...
@@ -92,6 +93,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
uint8_t
number_dl_pdu
=
DL_req
->
dl_config_request_body
.
number_pdu
;
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
;
nfapi_nr_dl_config_request_pdu_t
*
dl_config_dlsch_pdu
;
int
i
;
...
...
@@ -122,11 +124,14 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
break
;
case
NFAPI_NR_DL_CONFIG_DCI_DL_PDU_TYPE
:
dl_config_dlsch_pdu
=
&
DL_req
->
dl_config_request_body
.
dl_config_pdu_list
[
++
i
];
handle_nfapi_nr_dci_dl_pdu
(
gNB
,
frame
,
subframe
,
proc
,
dl_config_pdu
);
dl_config_pdu
,
dl_config_dlsch_pdu
);
gNB
->
pdcch_vars
.
num_dci
++
;
gNB
->
pdcch_vars
.
num_pdsch_rnti
++
;
do_oai
=
1
;
break
;
}
...
...
openair1/SCHED_NR/fapi_nr_l1.h
View file @
952ccec1
...
...
@@ -42,4 +42,5 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO);
void
handle_nfapi_nr_dci_dl_pdu
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
subframe
,
gNB_rxtx_proc_t
*
proc
,
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
);
nfapi_nr_dl_config_request_pdu_t
*
dl_config_pdu
,
nfapi_nr_dl_config_request_pdu_t
*
dl_config_dlsch_pdu
);
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
952ccec1
...
...
@@ -46,7 +46,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
module_idP
];
//NR_COMMON_channels_t *cc = nr_mac->common_channels;
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_dci_pdu
;
nfapi_nr_dl_config_request_pdu_t
*
dl_config_dlsch_pdu
;
nfapi_tx_request_pdu_t
*
TX_req
;
uint16_t
sfn_sf
=
frameP
<<
4
|
subframeP
;
uint16_t
rnti
=
0x1234
;
...
...
@@ -59,20 +60,27 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
dl_req
=
&
nr_mac
->
DL_req
[
CC_id
].
dl_config_request_body
;
dl_config_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_pdu
,
0
,
sizeof
(
nfapi_nr_dl_config_request_pdu_t
));
dl_config_pdu
->
pdu_type
=
NFAPI_NR_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_config_dci_dl_pdu
));
dl_config_
dci_
pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
];
memset
((
void
*
)
dl_config_
dci_
pdu
,
0
,
sizeof
(
nfapi_nr_dl_config_request_pdu_t
));
dl_config_
dci_
pdu
->
pdu_type
=
NFAPI_NR_DL_CONFIG_DCI_DL_PDU_TYPE
;
dl_config_
dci_
pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_config_dci_dl_pdu
));
nfapi_nr_dl_config_dci_dl_pdu_rel15_t
*
pdu_rel15
=
&
dl_config_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel15
;
nfapi_nr_dl_config_pdcch_parameters_rel15_t
*
params_rel15
=
&
dl_config_pdu
->
dci_dl_pdu
.
pdcch_params_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_pdu_rel15
=
&
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel15
;
dl_config_dlsch_pdu
=
&
dl_req
->
dl_config_pdu_list
[
dl_req
->
number_pdu
+
1
];
memset
((
void
*
)
dl_config_dlsch_pdu
,
0
,
sizeof
(
nfapi_nr_dl_config_request_pdu_t
));
dl_config_dlsch_pdu
->
pdu_type
=
NFAPI_NR_DL_CONFIG_DLSCH_PDU_TYPE
;
dl_config_dlsch_pdu
->
pdu_size
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_config_dlsch_pdu
));
nfapi_nr_dl_config_dci_dl_pdu_rel15_t
*
pdu_rel15
=
&
dl_config_dci_pdu
->
dci_dl_pdu
.
dci_dl_pdu_rel15
;
nfapi_nr_dl_config_pdcch_parameters_rel15_t
*
params_rel15
=
&
dl_config_dci_pdu
->
dci_dl_pdu
.
pdcch_params_rel15
;
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_pdu_rel15
=
&
dl_config_dlsch_pdu
->
dlsch_pdu
.
dlsch_pdu_rel15
;
dlsch_pdu_rel15
->
start_prb
=
0
;
dlsch_pdu_rel15
->
n_prb
=
40
;
dlsch_pdu_rel15
->
start_symbol
=
8
;
dlsch_pdu_rel15
->
nb_symbols
=
6
;
dlsch_pdu_rel15
->
rnti
=
rnti
;
dlsch_pdu_rel15
->
nb_layers
=
1
;
dlsch_pdu_rel15
->
nb_codewords
=
1
;
nr_configure_css_dci_from_mib
(
&
gNB
->
pdcch_type0_params
,
kHz30
,
kHz30
,
nr_FR1
,
0
,
0
,
...
...
@@ -125,6 +133,9 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
params_rel15
->
nb_slots
,
params_rel15
->
sfn_mod2
,
params_rel15
->
first_slot
);
nr_get_tbs
(
&
dl_config_dlsch_pdu
->
dlsch_pdu
,
dl_config_dci_pdu
->
dci_dl_pdu
,
*
cfg
);
//LOG_I(MAC, "DLSCH PDU: ")
dl_req
->
number_dci
++
;
dl_req
->
number_pdsch_rnti
++
;
dl_req
->
number_pdu
+=
2
;
...
...
@@ -134,7 +145,16 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
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
;
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
+
1
];
TX_req
->
pdu_length
=
dlsch_pdu_rel15
->
transport_block_size
;
TX_req
->
pdu_index
=
nr_mac
->
pdu_index
[
CC_id
]
++
;
TX_req
->
num_segments
=
1
;
TX_req
->
segments
[
0
].
segment_length
=
8
;
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
;
...
...
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