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
lizhongxiao
OpenXG-RAN
Commits
5ee01490
Commit
5ee01490
authored
Sep 08, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ul-phr' into integration_2022_wk36b
parents
4f402e61
0a992c60
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
481 additions
and
383 deletions
+481
-383
common/utils/nr/nr_common.c
common/utils/nr/nr_common.c
+1
-0
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+1
-2
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
+2
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+1
-8
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+3
-4
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+40
-39
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-0
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+1
-0
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+2
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+9
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+4
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+398
-312
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+0
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+1
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+1
-6
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+9
-0
openair2/RRC/NR/nr_rrc_config.h
openair2/RRC/NR/nr_rrc_config.h
+1
-0
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+1
-10
No files found.
common/utils/nr/nr_common.c
View file @
5ee01490
...
@@ -724,3 +724,4 @@ void SLIV2SL(int SLIV,int *S,int *L) {
...
@@ -724,3 +724,4 @@ void SLIV2SL(int SLIV,int *S,int *L) {
*
S
=
13
-
SLIVmod14
;
*
S
=
13
-
SLIVmod14
;
}
}
}
}
common/utils/nr/nr_common.h
View file @
5ee01490
...
@@ -56,10 +56,9 @@ typedef enum frequency_range_e {
...
@@ -56,10 +56,9 @@ typedef enum frequency_range_e {
}
frequency_range_t
;
}
frequency_range_t
;
extern
const
nr_bandentry_t
nr_bandtable
[];
extern
const
nr_bandentry_t
nr_bandtable
[];
static
inline
int
get_num_dmrs
(
uint16_t
dmrs_mask
)
{
static
inline
int
get_num_dmrs
(
uint16_t
dmrs_mask
)
{
int
num_dmrs
=
0
;
int
num_dmrs
=
0
;
for
(
int
i
=
0
;
i
<
16
;
i
++
)
num_dmrs
+=
((
dmrs_mask
>>
i
)
&
1
);
for
(
int
i
=
0
;
i
<
16
;
i
++
)
num_dmrs
+=
((
dmrs_mask
>>
i
)
&
1
);
return
(
num_dmrs
);
return
(
num_dmrs
);
}
}
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
5ee01490
...
@@ -777,6 +777,7 @@ typedef struct {
...
@@ -777,6 +777,7 @@ typedef struct {
}
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
;
}
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
;
typedef
struct
{
typedef
struct
{
uint8_t
ldpcBaseGraph
;
uint32_t
tbSizeLbrmBytes
;
uint32_t
tbSizeLbrmBytes
;
}
nfapi_v3_pdsch_maintenance_parameters_t
;
}
nfapi_v3_pdsch_maintenance_parameters_t
;
...
@@ -1193,6 +1194,7 @@ typedef struct
...
@@ -1193,6 +1194,7 @@ typedef struct
#define PUSCH_PDU_BITMAP_DFTS_OFDM 0x8
#define PUSCH_PDU_BITMAP_DFTS_OFDM 0x8
typedef
struct
{
typedef
struct
{
uint8_t
ldpcBaseGraph
;
uint32_t
tbSizeLbrmBytes
;
uint32_t
tbSizeLbrmBytes
;
}
nfapi_v3_pusch_maintenance_parameters_t
;
}
nfapi_v3_pusch_maintenance_parameters_t
;
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
5ee01490
...
@@ -375,14 +375,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
...
@@ -375,14 +375,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
memcpy
(
harq
->
b
,
a
,
(
A
/
8
)
+
3
);
// using 3 bytes to mimic the case of 24 bit crc
memcpy
(
harq
->
b
,
a
,
(
A
/
8
)
+
3
);
// using 3 bytes to mimic the case of 24 bit crc
}
}
// target_code_rate is in 0.1 units
impp
.
BG
=
rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
;
float
Coderate
=
(
float
)
rel15
->
targetCodeRate
[
0
]
/
10240
.
0
f
;
LOG_D
(
PHY
,
"DLSCH Coderate %f
\n
"
,
Coderate
);
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
)
impp
.
BG
=
2
;
else
impp
.
BG
=
1
;
start_meas
(
dlsch_segmentation_stats
);
start_meas
(
dlsch_segmentation_stats
);
impp
.
Kb
=
nr_segmentation
(
harq
->
b
,
harq
->
c
,
harq
->
B
,
&
impp
.
n_segments
,
&
impp
.
K
,
impp
.
Zc
,
&
impp
.
F
,
impp
.
BG
);
impp
.
Kb
=
nr_segmentation
(
harq
->
b
,
harq
->
c
,
harq
->
B
,
&
impp
.
n_segments
,
&
impp
.
K
,
impp
.
Zc
,
&
impp
.
F
,
impp
.
BG
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
5ee01490
...
@@ -380,7 +380,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -380,7 +380,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint32_t
r
;
uint32_t
r
;
uint32_t
r_offset
;
uint32_t
r_offset
;
uint32_t
offset
;
uint32_t
offset
;
int
kc
;
int
E
;
int
E
;
int8_t
llrProcBuf
[
22
*
384
];
int8_t
llrProcBuf
[
22
*
384
];
int
ret
=
0
;
int
ret
=
0
;
...
@@ -462,8 +461,9 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -462,8 +461,9 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
LOG_D
(
PHY
,
"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, Coderate %f RV %d round %d
\n
"
,
LOG_D
(
PHY
,
"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, Coderate %f RV %d round %d
\n
"
,
harq_pid
,
A
,
G
,
mcs
,
n_layers
,
nb_rb
,
Qm
,
Coderate
,
pusch_pdu
->
pusch_data
.
rv_index
,
harq_process
->
round
);
harq_pid
,
A
,
G
,
mcs
,
n_layers
,
nb_rb
,
Qm
,
Coderate
,
pusch_pdu
->
pusch_data
.
rv_index
,
harq_process
->
round
);
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
){
p_decParams
->
BG
=
pusch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
;
p_decParams
->
BG
=
2
;
int
kc
;
if
(
p_decParams
->
BG
==
2
){
kc
=
52
;
kc
=
52
;
if
(
Coderate
<
0
.
3333
)
{
if
(
Coderate
<
0
.
3333
)
{
p_decParams
->
R
=
15
;
p_decParams
->
R
=
15
;
...
@@ -475,7 +475,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -475,7 +475,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
p_decParams
->
R
=
23
;
p_decParams
->
R
=
23
;
}
}
}
else
{
}
else
{
p_decParams
->
BG
=
1
;
kc
=
68
;
kc
=
68
;
if
(
Coderate
<
0
.
6667
)
{
if
(
Coderate
<
0
.
6667
)
{
p_decParams
->
R
=
13
;
p_decParams
->
R
=
13
;
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
5ee01490
...
@@ -84,45 +84,45 @@ nrUE_params_t *get_nrUE_params(void) {
...
@@ -84,45 +84,45 @@ nrUE_params_t *get_nrUE_params(void) {
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
char
c
;
char
c
;
int
i
;
//,j,l,aa;
int
i
;
//,j,l,aa;
double
SNR
,
SNR_lin
,
snr0
=
-
2
.
0
,
snr1
=
2
.
0
;
double
SNR
,
SNR_lin
,
snr0
=
-
2
.
0
,
snr1
=
2
.
0
;
double
snr_step
=
0
.
1
;
double
snr_step
=
0
.
1
;
uint8_t
snr1set
=
0
;
uint8_t
snr1set
=
0
;
int
**
txdata
;
int
**
txdata
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
double
**
s_re
,
**
s_im
,
**
r_re
,
**
r_im
;
// int sync_pos, sync_pos_slot;
// int sync_pos, sync_pos_slot;
// FILE *rx_frame_file;
// FILE *rx_frame_file;
FILE
*
output_fd
=
NULL
;
FILE
*
output_fd
=
NULL
;
//uint8_t write_output_file = 0;
//uint8_t write_output_file = 0;
// int subframe_offset;
// int subframe_offset;
// char fname[40], vname[40];
// char fname[40], vname[40];
int
trial
,
n_trials
=
1
,
n_errors
=
0
,
n_false_positive
=
0
;
int
trial
,
n_trials
=
1
,
n_errors
=
0
,
n_false_positive
=
0
;
uint8_t
n_tx
=
1
,
n_rx
=
1
;
uint8_t
n_tx
=
1
,
n_rx
=
1
;
//uint8_t transmission_mode = 1;
//uint8_t transmission_mode = 1;
uint16_t
Nid_cell
=
0
;
uint16_t
Nid_cell
=
0
;
channel_desc_t
*
gNB2UE
;
channel_desc_t
*
gNB2UE
;
uint8_t
extended_prefix_flag
=
0
;
uint8_t
extended_prefix_flag
=
0
;
//int8_t interf1 = -21, interf2 = -21;
//int8_t interf1 = -21, interf2 = -21;
FILE
*
input_fd
=
NULL
,
*
pbch_file_fd
=
NULL
;
FILE
*
input_fd
=
NULL
,
*
pbch_file_fd
=
NULL
;
//char input_val_str[50],input_val_str2[50];
//char input_val_str[50],input_val_str2[50];
//uint16_t NB_RB=25;
//uint16_t NB_RB=25;
SCM_t
channel_model
=
AWGN
;
//Rayleigh1_anticorr;
SCM_t
channel_model
=
AWGN
;
//Rayleigh1_anticorr;
uint16_t
N_RB_DL
=
106
,
mu
=
1
;
uint16_t
N_RB_DL
=
106
,
mu
=
1
;
//unsigned char frame_type = 0;
//unsigned char frame_type = 0;
unsigned
char
pbch_phase
=
0
;
unsigned
char
pbch_phase
=
0
;
int
frame
=
0
,
slot
=
0
;
int
frame
=
0
,
slot
=
0
;
int
frame_length_complex_samples
;
int
frame_length_complex_samples
;
//int frame_length_complex_samples_no_prefix;
//int frame_length_complex_samples_no_prefix;
NR_DL_FRAME_PARMS
*
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
;
uint8_t
Kmimo
=
0
;
uint8_t
Kmimo
=
0
;
uint32_t
Nsoft
=
0
;
uint32_t
Nsoft
=
0
;
double
sigma
;
double
sigma
;
unsigned
char
qbits
=
8
;
unsigned
char
qbits
=
8
;
int
ret
;
int
ret
;
//int run_initial_sync=0;
//int run_initial_sync=0;
int
loglvl
=
OAILOG_WARNING
;
int
loglvl
=
OAILOG_WARNING
;
uint8_t
dlsch_threads
=
0
;
uint8_t
dlsch_threads
=
0
;
float
target_error_rate
=
0
.
01
;
float
target_error_rate
=
0
.
01
;
uint64_t
SSB_positions
=
0x01
;
uint64_t
SSB_positions
=
0x01
;
uint16_t
nb_symb_sch
=
12
;
uint16_t
nb_symb_sch
=
12
;
...
@@ -468,6 +468,7 @@ int main(int argc, char **argv)
...
@@ -468,6 +468,7 @@ int main(int argc, char **argv)
rel15
->
mcsIndex
[
0
]
=
Imcs
;
rel15
->
mcsIndex
[
0
]
=
Imcs
;
rel15
->
numDmrsCdmGrpsNoData
=
1
;
rel15
->
numDmrsCdmGrpsNoData
=
1
;
rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
Tbslbrm
;
rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
Tbslbrm
;
rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
,
rate
);
double
modulated_input
[
16
*
68
*
384
];
// [hna] 16 segments, 68*Zc
double
modulated_input
[
16
*
68
*
384
];
// [hna] 16 segments, 68*Zc
short
channel_output_fixed
[
16
*
68
*
384
];
short
channel_output_fixed
[
16
*
68
*
384
];
//unsigned char *estimated_output;
//unsigned char *estimated_output;
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
5ee01490
...
@@ -327,6 +327,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
...
@@ -327,6 +327,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
sched_pdsch
->
rbStart
=
g_rbStart
;
sched_pdsch
->
rbStart
=
g_rbStart
;
sched_pdsch
->
rbSize
=
g_rbSize
;
sched_pdsch
->
rbSize
=
g_rbSize
;
sched_pdsch
->
mcs
=
g_mcsIndex
;
sched_pdsch
->
mcs
=
g_mcsIndex
;
sched_pdsch
->
nrOfLayers
=
g_nrOfLayers
;
/* the following might override the table that is mandated by RRC
/* the following might override the table that is mandated by RRC
* configuration */
* configuration */
current_BWP
->
mcsTableIdx
=
g_mcsTableIdx
;
current_BWP
->
mcsTableIdx
=
g_mcsTableIdx
;
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
5ee01490
...
@@ -472,6 +472,7 @@ int main(int argc, char **argv)
...
@@ -472,6 +472,7 @@ int main(int argc, char **argv)
rel15_ul
->
nrOfLayers
=
Nl
;
rel15_ul
->
nrOfLayers
=
Nl
;
rel15_ul
->
target_code_rate
=
code_rate
;
rel15_ul
->
target_code_rate
=
code_rate
;
rel15_ul
->
pusch_data
.
tb_size
=
TBS
>>
3
;
rel15_ul
->
pusch_data
.
tb_size
=
TBS
>>
3
;
rel15_ul
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
,
code_rate
);
///////////////////////////////////////////////////
///////////////////////////////////////////////////
double
modulated_input
[
16
*
68
*
384
];
// [hna] 16 segments, 68*Zc
double
modulated_input
[
16
*
68
*
384
];
// [hna] 16 segments, 68*Zc
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
5ee01490
...
@@ -1135,7 +1135,7 @@ int main(int argc, char **argv)
...
@@ -1135,7 +1135,7 @@ int main(int argc, char **argv)
pusch_pdu
->
bwp_size
=
abwp_size
;
pusch_pdu
->
bwp_size
=
abwp_size
;
}
}
pusch_pdu
->
pusch_data
.
tb_size
=
TBS
/
8
;
pusch_pdu
->
pusch_data
.
tb_size
=
TBS
>>
3
;
pusch_pdu
->
pdu_bit_map
=
pdu_bit_map
;
pusch_pdu
->
pdu_bit_map
=
pdu_bit_map
;
pusch_pdu
->
rnti
=
n_rnti
;
pusch_pdu
->
rnti
=
n_rnti
;
pusch_pdu
->
mcs_index
=
Imcs
;
pusch_pdu
->
mcs_index
=
Imcs
;
...
@@ -1168,6 +1168,7 @@ int main(int argc, char **argv)
...
@@ -1168,6 +1168,7 @@ int main(int argc, char **argv)
pusch_pdu
->
pusch_ptrs
.
ptrs_freq_density
=
ptrs_freq_density
;
pusch_pdu
->
pusch_ptrs
.
ptrs_freq_density
=
ptrs_freq_density
;
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
=
(
nfapi_nr_ptrs_ports_t
*
)
malloc
(
2
*
sizeof
(
nfapi_nr_ptrs_ports_t
));
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
=
(
nfapi_nr_ptrs_ports_t
*
)
malloc
(
2
*
sizeof
(
nfapi_nr_ptrs_ports_t
));
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
=
0
;
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
=
0
;
pusch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
,
code_rate
);
// if transform precoding is enabled
// if transform precoding is enabled
if
(
transform_precoding
==
transformPrecoder_enabled
)
{
if
(
transform_precoding
==
transformPrecoder_enabled
)
{
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
5ee01490
...
@@ -3498,6 +3498,15 @@ void csi_period_offset(NR_CSI_ReportConfig_t *csirep,
...
@@ -3498,6 +3498,15 @@ void csi_period_offset(NR_CSI_ReportConfig_t *csirep,
}
}
}
}
uint8_t
get_BG
(
uint32_t
A
,
uint16_t
R
)
{
float
code_rate
=
(
float
)
R
/
10240
.
0
f
;
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
code_rate
<=
0
.
6667
))
||
code_rate
<=
0
.
25
)
return
2
;
else
return
1
;
}
uint32_t
get_Y
(
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
)
{
uint32_t
get_Y
(
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
)
{
if
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
)
if
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
)
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
5ee01490
...
@@ -40,6 +40,8 @@
...
@@ -40,6 +40,8 @@
uint32_t
get_Y
(
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
);
uint32_t
get_Y
(
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
);
uint8_t
get_BG
(
uint32_t
A
,
uint16_t
R
);
uint64_t
from_nrarfcn
(
int
nr_bandP
,
uint8_t
scs_index
,
uint32_t
dl_nrarfcn
);
uint64_t
from_nrarfcn
(
int
nr_bandP
,
uint8_t
scs_index
,
uint32_t
dl_nrarfcn
);
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
uint32_t
bw
);
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
uint32_t
bw
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
5ee01490
...
@@ -1057,6 +1057,8 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
...
@@ -1057,6 +1057,8 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
pusch_pdu
->
mcs_index
=
mcsindex
;
pusch_pdu
->
mcs_index
=
mcsindex
;
pusch_pdu
->
pusch_data
.
tb_size
=
TBS
;
pusch_pdu
->
pusch_data
.
tb_size
=
TBS
;
pusch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
<<
3
,
R
);
}
}
}
}
...
@@ -1322,6 +1324,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
...
@@ -1322,6 +1324,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
mcsTableIdx
,
pdsch_pdu_rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
mcsTableIdx
,
bw_tbslbrm
,
bw_tbslbrm
,
1
);
1
);
pdsch_pdu_rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
<<
3
,
R
);
// Fill PDCCH DL DCI PDU
// Fill PDCCH DL DCI PDU
nfapi_nr_dl_dci_pdu_t
*
dci_pdu
=
&
pdcch_pdu_rel15
->
dci_pdu
[
pdcch_pdu_rel15
->
numDlDci
];
nfapi_nr_dl_dci_pdu_t
*
dci_pdu
=
&
pdcch_pdu_rel15
->
dci_pdu
[
pdcch_pdu_rel15
->
numDlDci
];
...
@@ -1703,6 +1706,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
...
@@ -1703,6 +1706,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
pdsch_pdu_rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
mcsTableIdx
,
pdsch_pdu_rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
mcsTableIdx
,
bw_tbslbrm
,
bw_tbslbrm
,
1
);
1
);
pdsch_pdu_rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
harq
->
tb_size
<<
3
,
R
);
pdsch_pdu_rel15
->
precodingAndBeamforming
.
num_prgs
=
1
;
pdsch_pdu_rel15
->
precodingAndBeamforming
.
num_prgs
=
1
;
pdsch_pdu_rel15
->
precodingAndBeamforming
.
prg_size
=
275
;
pdsch_pdu_rel15
->
precodingAndBeamforming
.
prg_size
=
275
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
5ee01490
...
@@ -465,6 +465,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
...
@@ -465,6 +465,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
pdsch_pdu_rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
0
,
pdsch_pdu_rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
0
,
pdsch_pdu_rel15
->
BWPSize
,
pdsch_pdu_rel15
->
BWPSize
,
1
);
1
);
pdsch_pdu_rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
<<
3
,
pdsch_pdu_rel15
->
targetCodeRate
[
0
]);
/* Fill PDCCH DL DCI PDU */
/* Fill PDCCH DL DCI PDU */
nfapi_nr_dl_dci_pdu_t
*
dci_pdu
=
&
pdcch_pdu_rel15
->
dci_pdu
[
pdcch_pdu_rel15
->
numDlDci
];
nfapi_nr_dl_dci_pdu_t
*
dci_pdu
=
&
pdcch_pdu_rel15
->
dci_pdu
[
pdcch_pdu_rel15
->
numDlDci
];
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
5ee01490
...
@@ -1071,6 +1071,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -1071,6 +1071,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdsch_pdu
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
current_BWP
->
mcsTableIdx
,
pdsch_pdu
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
current_BWP
->
mcsTableIdx
,
bw_tbslbrm
,
bw_tbslbrm
,
nl_tbslbrm
);
nl_tbslbrm
);
pdsch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
<<
3
,
R
);
NR_PDSCH_Config_t
*
pdsch_Config
=
current_BWP
->
pdsch_Config
;
NR_PDSCH_Config_t
*
pdsch_Config
=
current_BWP
->
pdsch_Config
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
5ee01490
...
@@ -214,6 +214,7 @@ uint8_t get_mcs_from_cqi(int mcs_table, int cqi_table, int cqi_idx)
...
@@ -214,6 +214,7 @@ uint8_t get_mcs_from_cqi(int mcs_table, int cqi_table, int cqi_idx)
return
9
;
return
9
;
}
}
void
set_dl_dmrs_ports
(
NR_pdsch_semi_static_t
*
ps
)
{
void
set_dl_dmrs_ports
(
NR_pdsch_semi_static_t
*
ps
)
{
//TODO first basic implementation of dmrs port selection
//TODO first basic implementation of dmrs port selection
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
5ee01490
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
5ee01490
...
@@ -469,7 +469,6 @@ uint16_t set_pm_index(NR_UE_sched_ctrl_t *sched_ctrl,
...
@@ -469,7 +469,6 @@ uint16_t set_pm_index(NR_UE_sched_ctrl_t *sched_ctrl,
int
codebook_mode
);
int
codebook_mode
);
uint8_t
get_mcs_from_cqi
(
int
mcs_table
,
int
cqi_table
,
int
cqi_idx
);
uint8_t
get_mcs_from_cqi
(
int
mcs_table
,
int
cqi_table
,
int
cqi_idx
);
uint8_t
set_dl_nrOfLayers
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
uint8_t
set_dl_nrOfLayers
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
const
int
get_dl_tda
(
const
gNB_MAC_INST
*
nrmac
,
const
NR_ServingCellConfigCommon_t
*
scc
,
int
slot
);
const
int
get_dl_tda
(
const
gNB_MAC_INST
*
nrmac
,
const
NR_ServingCellConfigCommon_t
*
scc
,
int
slot
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
5ee01490
...
@@ -394,6 +394,7 @@ typedef struct NR_pusch_semi_static_t {
...
@@ -394,6 +394,7 @@ typedef struct NR_pusch_semi_static_t {
typedef
struct
NR_sched_pusch
{
typedef
struct
NR_sched_pusch
{
int
frame
;
int
frame
;
int
slot
;
int
slot
;
int
mu
;
/// RB allocation within active uBWP
/// RB allocation within active uBWP
uint16_t
rbSize
;
uint16_t
rbSize
;
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
5ee01490
...
@@ -1664,12 +1664,7 @@ void fill_initial_cellGroupConfig(int uid,
...
@@ -1664,12 +1664,7 @@ void fill_initial_cellGroupConfig(int uid,
tag
->
tag_Id
=
0
;
tag
->
tag_Id
=
0
;
tag
->
timeAlignmentTimer
=
NR_TimeAlignmentTimer_infinity
;
tag
->
timeAlignmentTimer
=
NR_TimeAlignmentTimer_infinity
;
ASN_SEQUENCE_ADD
(
&
mac_CellGroupConfig
->
tag_Config
->
tag_ToAddModList
->
list
,
tag
);
ASN_SEQUENCE_ADD
(
&
mac_CellGroupConfig
->
tag_Config
->
tag_ToAddModList
->
list
,
tag
);
mac_CellGroupConfig
->
phr_Config
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
phr_Config
));
set_phr_config
(
mac_CellGroupConfig
);
mac_CellGroupConfig
->
phr_Config
->
present
=
NR_SetupRelease_PHR_Config_PR_setup
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
));
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_PeriodicTimer
=
NR_PHR_Config__phr_PeriodicTimer_sf10
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_ProhibitTimer
=
NR_PHR_Config__phr_ProhibitTimer_sf10
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_Tx_PowerFactorChange
=
NR_PHR_Config__phr_Tx_PowerFactorChange_dB1
;
mac_CellGroupConfig
->
schedulingRequestConfig
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
schedulingRequestConfig
));
mac_CellGroupConfig
->
schedulingRequestConfig
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
schedulingRequestConfig
));
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
=
CALLOC
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
));
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
=
CALLOC
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
schedulingRequestConfig
->
schedulingRequestToAddModList
));
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
5ee01490
...
@@ -1147,4 +1147,13 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp,
...
@@ -1147,4 +1147,13 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp,
ubwp
->
bwp_Dedicated
->
beamFailureRecoveryConfig
=
NULL
;
ubwp
->
bwp_Dedicated
->
beamFailureRecoveryConfig
=
NULL
;
}
}
void
set_phr_config
(
NR_MAC_CellGroupConfig_t
*
mac_CellGroupConfig
)
{
mac_CellGroupConfig
->
phr_Config
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
phr_Config
));
mac_CellGroupConfig
->
phr_Config
->
present
=
NR_SetupRelease_PHR_Config_PR_setup
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
));
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_PeriodicTimer
=
NR_PHR_Config__phr_PeriodicTimer_sf10
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_ProhibitTimer
=
NR_PHR_Config__phr_ProhibitTimer_sf10
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_Tx_PowerFactorChange
=
NR_PHR_Config__phr_Tx_PowerFactorChange_dB1
;
}
openair2/RRC/NR/nr_rrc_config.h
View file @
5ee01490
...
@@ -119,6 +119,7 @@ typedef struct physicalcellgroup_s{
...
@@ -119,6 +119,7 @@ typedef struct physicalcellgroup_s{
long
RNTI_Value
[
MAX_NUM_CCs
];
long
RNTI_Value
[
MAX_NUM_CCs
];
}
physicalcellgroup_t
;
}
physicalcellgroup_t
;
void
set_phr_config
(
NR_MAC_CellGroupConfig_t
*
mac_CellGroupConfig
);
uint64_t
get_ssb_bitmap
(
const
NR_ServingCellConfigCommon_t
*
scc
);
uint64_t
get_ssb_bitmap
(
const
NR_ServingCellConfigCommon_t
*
scc
);
void
rrc_coreset_config
(
NR_ControlResourceSet_t
*
coreset
,
void
rrc_coreset_config
(
NR_ControlResourceSet_t
*
coreset
,
int
bwp_id
,
int
bwp_id
,
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
5ee01490
...
@@ -133,16 +133,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
...
@@ -133,16 +133,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
tag
->
tag_Id
=
0
;
tag
->
tag_Id
=
0
;
tag
->
timeAlignmentTimer
=
NR_TimeAlignmentTimer_infinity
;
tag
->
timeAlignmentTimer
=
NR_TimeAlignmentTimer_infinity
;
ASN_SEQUENCE_ADD
(
&
mac_CellGroupConfig
->
tag_Config
->
tag_ToAddModList
->
list
,
tag
);
ASN_SEQUENCE_ADD
(
&
mac_CellGroupConfig
->
tag_Config
->
tag_ToAddModList
->
list
,
tag
);
mac_CellGroupConfig
->
phr_Config
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
phr_Config
));
set_phr_config
(
mac_CellGroupConfig
);
mac_CellGroupConfig
->
phr_Config
->
present
=
NR_SetupRelease_PHR_Config_PR_setup
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
));
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_PeriodicTimer
=
NR_PHR_Config__phr_PeriodicTimer_sf20
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_ProhibitTimer
=
NR_PHR_Config__phr_ProhibitTimer_sf0
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_Tx_PowerFactorChange
=
NR_PHR_Config__phr_Tx_PowerFactorChange_dB3
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
multiplePHR
=
false
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
dummy
=
false
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_Type2OtherCell
=
false
;
mac_CellGroupConfig
->
phr_Config
->
choice
.
setup
->
phr_ModeOtherCG
=
NR_PHR_Config__phr_ModeOtherCG_real
;
mac_CellGroupConfig
->
skipUplinkTxDynamic
=
false
;
mac_CellGroupConfig
->
skipUplinkTxDynamic
=
false
;
mac_CellGroupConfig
->
ext1
=
NULL
;
mac_CellGroupConfig
->
ext1
=
NULL
;
secondaryCellGroup
->
physicalCellGroupConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
physicalCellGroupConfig
));
secondaryCellGroup
->
physicalCellGroupConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
physicalCellGroupConfig
));
...
...
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