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
zzha zzha
OpenXG-RAN
Commits
478ea7ab
Commit
478ea7ab
authored
Jul 28, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BG at MAC as part of new FAPI version
parent
04a09c99
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
17 deletions
+23
-17
common/utils/nr/nr_common.c
common/utils/nr/nr_common.c
+0
-6
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+0
-1
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
-5
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+3
-4
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
+9
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
No files found.
common/utils/nr/nr_common.c
View file @
478ea7ab
...
...
@@ -495,9 +495,3 @@ void SLIV2SL(int SLIV,int *S,int *L) {
}
}
int
get_BG
(
uint32_t
A
,
float
code_rate
)
{
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
code_rate
<=
0
.
6667
))
||
code_rate
<=
0
.
25
)
return
2
;
else
return
1
;
}
common/utils/nr/nr_common.h
View file @
478ea7ab
...
...
@@ -76,7 +76,6 @@ uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols);
int
get_nb_periods_per_frame
(
uint8_t
tdd_period
);
int
get_supported_band_index
(
int
scs
,
int
band
,
int
n_rbs
);
long
rrc_get_max_nr_csrs
(
uint8_t
max_rbs
,
long
b_SRS
);
int
get_BG
(
uint32_t
A
,
float
code_rate
);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
...
...
nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h
View file @
478ea7ab
...
...
@@ -777,6 +777,7 @@ typedef struct {
}
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
;
typedef
struct
{
uint8_t
ldpcBaseGraph
;
uint32_t
tbSizeLbrmBytes
;
}
nfapi_v3_pdsch_maintenance_parameters_t
;
...
...
@@ -1193,6 +1194,7 @@ typedef struct
#define PUSCH_PDU_BITMAP_DFTS_OFDM 0x8
typedef
struct
{
uint8_t
ldpcBaseGraph
;
uint32_t
tbSizeLbrmBytes
;
}
nfapi_v3_pusch_maintenance_parameters_t
;
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
478ea7ab
...
...
@@ -376,11 +376,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
}
// target_code_rate is in 0.1 units
float
Coderate
=
(
float
)
rel15
->
targetCodeRate
[
0
]
/
10240
.
0
f
;
LOG_D
(
PHY
,
"DLSCH Coderate %f
\n
"
,
Coderate
);
impp
.
BG
=
get_BG
(
A
,
Coderate
);
impp
.
BG
=
rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
;
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
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
478ea7ab
...
...
@@ -382,7 +382,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
uint32_t
r
;
uint32_t
r_offset
;
uint32_t
offset
;
int
kc
;
int
E
;
#ifdef PRINT_CRC_CHECK
...
...
@@ -445,8 +444,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
"
,
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
=
2
;
p_decParams
->
BG
=
pusch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
;
int
kc
;
if
(
p_decParams
->
BG
==
2
){
kc
=
52
;
if
(
Coderate
<
0
.
3333
)
{
p_decParams
->
R
=
15
;
...
...
@@ -458,7 +458,6 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
p_decParams
->
R
=
23
;
}
}
else
{
p_decParams
->
BG
=
1
;
kc
=
68
;
if
(
Coderate
<
0
.
6667
)
{
p_decParams
->
R
=
13
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
478ea7ab
...
...
@@ -1121,6 +1121,8 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
pusch_pdu
->
mcs_index
=
mcsindex
;
pusch_pdu
->
pusch_data
.
tb_size
=
TBS
;
pusch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
<<
3
,
R
);
}
}
...
...
@@ -1425,6 +1427,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
,
bw_tbslbrm
,
1
);
pdsch_pdu_rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
<<
3
,
R
);
// Fill PDCCH DL DCI PDU
nfapi_nr_dl_dci_pdu_t
*
dci_pdu
=
&
pdcch_pdu_rel15
->
dci_pdu
[
pdcch_pdu_rel15
->
numDlDci
];
...
...
@@ -1829,6 +1832,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
,
bw_tbslbrm
,
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
.
prg_size
=
275
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
478ea7ab
...
...
@@ -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
->
BWPSize
,
1
);
pdsch_pdu_rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
<<
3
,
pdsch_pdu_rel15
->
targetCodeRate
[
0
]);
/* Fill PDCCH DL DCI PDU */
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 @
478ea7ab
...
...
@@ -1128,6 +1128,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdsch_pdu
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
nr_compute_tbslbrm
(
ps
->
mcsTableIdx
,
bw_tbslbrm
,
nl_tbslbrm
);
pdsch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
<<
3
,
R
);
NR_PDSCH_Config_t
*
pdsch_Config
=
NULL
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
478ea7ab
...
...
@@ -245,6 +245,15 @@ void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps) {
}
}
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
;
}
NR_BWP_t
*
get_dl_bwp_genericParameters
(
NR_BWP_Downlink_t
*
active_bwp
,
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
,
const
NR_SIB1_t
*
sib1
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
478ea7ab
...
...
@@ -1837,6 +1837,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
pusch_pdu
->
pusch_data
.
num_cb
=
0
;
//CBG not supported
pusch_pdu
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
0
;
pusch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
sched_pusch
->
tb_size
<<
3
,
sched_pusch
->
R
);
LOG_D
(
NR_MAC
,
"PUSCH PDU : data_scrambling_identity %x, dmrs_scrambling_id %x
\n
"
,
pusch_pdu
->
data_scrambling_id
,
pusch_pdu
->
ul_dmrs_scrambling_id
);
/* TRANSFORM PRECODING --------------------------------------------------------*/
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
478ea7ab
...
...
@@ -498,7 +498,7 @@ uint16_t set_pm_index(NR_UE_sched_ctrl_t *sched_ctrl,
int
codebook_mode
);
uint8_t
get_mcs_from_cqi
(
int
mcs_table
,
int
cqi_table
,
int
cqi_idx
);
uint8_t
get_BG
(
uint32_t
A
,
uint16_t
R
);
uint8_t
set_dl_nrOfLayers
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
int
get_dci_format
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
...
...
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