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
c5357e6a
Commit
c5357e6a
authored
Jul 09, 2020
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'NR_RRC_harq_hacks'
parents
aea3bc2d
b22b7153
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
65 additions
and
59 deletions
+65
-59
openair1/PHY/INIT/nr_init_ru.c
openair1/PHY/INIT/nr_init_ru.c
+0
-3
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+6
-6
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+1
-1
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+1
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+9
-11
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+35
-27
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+3
-3
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+3
-5
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+0
-1
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+4
-0
No files found.
openair1/PHY/INIT/nr_init_ru.c
View file @
c5357e6a
...
...
@@ -40,9 +40,6 @@ int nr_phy_init_RU(RU_t *ru) {
int
p
;
int
re
;
// For memory allocation of ru->prach_rxsigF
int
mu
=
fp
->
numerology_index
;
LOG_I
(
PHY
,
"Initializing RU signal buffers (if_south %s) nb_tx %d
\n
"
,
ru_if_types
[
ru
->
if_south
],
ru
->
nb_tx
);
nfapi_nr_config_request_scf_t
*
cfg
;
...
...
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
c5357e6a
...
...
@@ -204,8 +204,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PUSCH
printf
(
"pilot %
d
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"data %
d
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
2
],
rxF
[
3
]);
printf
(
"pilot %
u
: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"data %
u
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
2
],
rxF
[
3
]);
#endif
multadd_real_vector_complex_scalar
(
fml
,
ch
,
...
...
@@ -221,7 +221,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
#ifdef DEBUG_PUSCH
printf
(
"pilot %u : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"data %
d
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
2
],
rxF
[
3
]);
printf
(
"data %
u
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
2
],
rxF
[
3
]);
#endif
multadd_real_vector_complex_scalar
(
fmm
,
ch
,
...
...
@@ -243,7 +243,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PUSCH
printf
(
"pilot %u : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"data %
d
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
2
],
rxF
[
3
]);
printf
(
"data %
u
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
,
rxF
[
2
],
rxF
[
3
]);
#endif
multadd_real_vector_complex_scalar
(
fm
,
ch
,
...
...
@@ -262,7 +262,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
#ifdef DEBUG_PUSCH
printf
(
"ch 0 %d
\n
"
,((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
]));
printf
(
"pilot %u: rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
&
rxF
[
0
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"data %
d
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
2
],
rxF
[
3
]);
printf
(
"data %
u
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
2
],
rxF
[
3
]);
#endif
multadd_real_vector_complex_scalar
(
fmr
,
ch
,
...
...
@@ -278,7 +278,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
#ifdef DEBUG_PUSCH
printf
(
"pilot %u: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
2
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"data %
d
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
+
2
,
rxF
[
2
],
rxF
[
3
]);
printf
(
"data %
u
: rxF - > (%d,%d)
\n
"
,
pilot_cnt
+
2
,
rxF
[
2
],
rxF
[
3
]);
#endif
multadd_real_vector_complex_scalar
(
fr
,
ch
,
...
...
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
c5357e6a
...
...
@@ -791,7 +791,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
if
(
LOG_DUMPFLAG
(
PRACH
))
{
int
en
=
dB_fixed
(
signal_energy
((
int32_t
*
)
&
rxsigF
[
0
][
0
],
840
));
//int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
// if (en>60) {
int
k
=
(
12
*
n_ra_prb
)
-
6
*
fp
->
N_RB_UL
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
c5357e6a
...
...
@@ -57,7 +57,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
NR_UE_PDCCH
*
pdcch_vars
=
PHY_vars_UE_g
[
module_id
][
cc_id
]
->
pdcch_vars
[
thread_id
][
0
];
NR_UE_ULSCH_t
*
ulsch0
=
PHY_vars_UE_g
[
module_id
][
cc_id
]
->
ulsch
[
thread_id
][
0
][
0
];
NR_DL_FRAME_PARMS
frame_parms
=
PHY_vars_UE_g
[
module_id
][
cc_id
]
->
frame_parms
;
PRACH_RESOURCES_t
*
prach_resources
=
PHY_vars_UE_g
[
module_id
][
cc_id
]
->
prach_resources
[
0
];
//
PRACH_RESOURCES_t *prach_resources = PHY_vars_UE_g[module_id][cc_id]->prach_resources[0];
// PUCCH_ConfigCommon_nr_t *pucch_config_common = PHY_vars_UE_g[module_id][cc_id]->pucch_config_common_nr[0];
// PUCCH_Config_t *pucch_config_dedicated = PHY_vars_UE_g[module_id][cc_id]->pucch_config_dedicated_nr[0];
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
c5357e6a
...
...
@@ -3284,15 +3284,14 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
int
*
dlsch_errors
,
runmode_t
mode
)
{
int
harq_pid
;
int
harq_pid
=
dlsch0
->
current_harq_pid
;
int
frame_rx
=
proc
->
frame_rx
;
int
nr_tti_rx
=
proc
->
nr_tti_rx
;
int
ret
=
0
,
ret1
=
0
;
NR_UE_PDSCH
*
pdsch_vars
;
uint8_t
is_cw0_active
=
0
;
uint8_t
is_cw1_active
=
0
;
nfapi_nr_config_request_t
*
cfg
=
&
ue
->
nrUE_config
;
uint8_t
dmrs_type
=
cfg
->
pdsch_config
.
PDSCHTimeDomainResourceAllocation_mappingType
[
0
].
value
;
// TODO: HARDCODED pdsch index
uint8_t
dmrs_type
=
dlsch0
->
harq_processes
[
harq_pid
]
->
dmrsConfigType
;
uint8_t
nb_re_dmrs
=
(
dmrs_type
==
NFAPI_NR_DMRS_TYPE1
)
?
6
:
4
;
// TODO: should changed my mac
uint16_t
length_dmrs
=
1
;
//cfg->pdsch_config.dmrs_max_length.value;
uint16_t
nb_symb_sch
=
9
;
...
...
@@ -3316,7 +3315,6 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
if
(
dlsch0
==
NULL
)
AssertFatal
(
0
,
"dlsch0 should be defined at this level
\n
"
);
harq_pid
=
dlsch0
->
current_harq_pid
;
is_cw0_active
=
dlsch0
->
harq_processes
[
harq_pid
]
->
status
;
nb_symb_sch
=
dlsch0
->
harq_processes
[
harq_pid
]
->
nb_symbols
;
start_symbol
=
dlsch0
->
harq_processes
[
harq_pid
]
->
start_symbol
;
...
...
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
c5357e6a
...
...
@@ -370,6 +370,7 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
}
m_0
=
get_ics_pucch
(
pucch_resource
,
format
);
AssertFatal
(
m_0
>=
0
,
"Invalid m_0
\n
"
);
if
(
format
==
pucch_format3_nr
)
{
if
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
format3
->
choice
.
setup
->
additionalDMRS
[
0
]
==
1
)
{
index_additional_dmrs
=
I_PUCCH_ADDITIONAL_DMRS
;
...
...
@@ -699,7 +700,7 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t
int
V_DAI_m_DL
=
0
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
if
(
mac
->
DLbwp
[
0
]
==
NULL
)
return
;
if
(
mac
->
DLbwp
[
0
]
==
NULL
)
return
0
;
if
(
mac
->
DLbwp
[
0
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
[
0
]
==
2
)
{
two_transport_blocks
=
TRUE
;
...
...
@@ -897,7 +898,7 @@ boolean_t select_pucch_resource(PHY_VARS_NR_UE *ue, NR_UE_MAC_INST_t *mac, uint8
/* No resource set has been already configured so pucch_configCommon from Sib1 should be used in this case */
if
(
ue
->
UE_mode
[
gNB_id
]
!=
PUSCH
)
{
*
initial_pucch_id
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Common
->
pucch_ConfigCommon
->
choice
.
setup
->
pucch_ResourceCommon
;
*
initial_pucch_id
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Common
->
pucch_ConfigCommon
->
choice
.
setup
->
pucch_ResourceCommon
[
0
]
;
if
(
*
initial_pucch_id
>=
NB_INITIAL_PUCCH_RESOURCE
)
{
LOG_E
(
PHY
,
"PUCCH Invalid initial resource index : at line %d in function %s of file %s
\n
"
,
LINE_FILE
,
__func__
,
FILE_NAME
);
*
initial_pucch_id
=
NB_INITIAL_PUCCH_RESOURCE
;
...
...
@@ -1060,7 +1061,7 @@ int find_pucch_resource_set(NR_UE_MAC_INST_t *mac, uint8_t gNB_id, int uci_size)
/* look for the first resource set which supports uci_size number of bits for payload */
while
(
pucch_resource_set_id
<
MAX_NB_OF_PUCCH_RESOURCE_SETS
)
{
if
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
!=
NULL
)
{
if
(
uci_size
<=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
->
maxPayloadMinus1
+
1
)
{
if
(
uci_size
<=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
resourceSetToAddModList
->
list
.
array
[
pucch_resource_set_id
]
->
maxPayloadMinus1
[
0
]
+
1
)
{
NR_TST_PHY_PRINTF
(
"PUCCH found resource set %d
\n
"
,
pucch_resource_set_id
);
return
(
pucch_resource_set_id
);
break
;
...
...
@@ -1093,9 +1094,8 @@ boolean_t check_pucch_format(NR_UE_MAC_INST_t *mac, uint8_t gNB_id, pucch_format
{
pucch_format_nr_t
selected_pucch_format
;
pucch_format_nr_t
selected_pucch_format_second
;
NR_SetupRelease_PUCCH_FormatConfig_t
*
identified_format
;
NR_SetupRelease_PUCCH_FormatConfig_t
*
identified_format
=
NULL
;
if
(
format_pucch
!=
pucch_format0_nr
)
{
switch
(
format_pucch
)
{
case
pucch_format1_nr
:
if
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
format1
!=
NULL
)
...
...
@@ -1116,13 +1116,15 @@ boolean_t check_pucch_format(NR_UE_MAC_INST_t *mac, uint8_t gNB_id, pucch_format
if
(
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
format4
!=
NULL
)
identified_format
=
mac
->
ULbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
->
pucch_Config
->
choice
.
setup
->
format4
;
break
;
default:
break
;
}
if
(
identified_format
->
choice
.
setup
->
nrofSlots
!=
1
)
{
if
((
identified_format
!=
NULL
)
&&
(
identified_format
->
choice
.
setup
->
nrofSlots
[
0
]
!=
1
)
)
{
LOG_E
(
PHY
,
"PUCCH not implemented multislots transmission : at line %d in function %s of file %s
\n
"
,
LINE_FILE
,
__func__
,
FILE_NAME
);
return
(
FALSE
);
}
}
if
(
nb_symbols_for_tx
<=
2
)
{
if
(
uci_size
<=
2
)
{
...
...
@@ -1290,6 +1292,7 @@ uint8_t get_nb_symbols_pucch(NR_PUCCH_Resource_t *pucch_resource, pucch_format_n
case
pucch_format4_nr
:
return
pucch_resource
->
format
.
choice
.
format4
->
nrofSymbols
;
}
return
0
;
}
uint16_t
get_starting_symb_idx
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
)
...
...
@@ -1310,6 +1313,7 @@ uint16_t get_starting_symb_idx(NR_PUCCH_Resource_t *pucch_resource, pucch_format
case
pucch_format4_nr
:
return
pucch_resource
->
format
.
choice
.
format4
->
startingSymbolIndex
;
}
return
0
;
}
int
get_ics_pucch
(
NR_PUCCH_Resource_t
*
pucch_resource
,
pucch_format_nr_t
format_type
)
...
...
@@ -1320,7 +1324,11 @@ int get_ics_pucch(NR_PUCCH_Resource_t *pucch_resource, pucch_format_nr_t format_
case
pucch_format1_nr
:
return
pucch_resource
->
format
.
choice
.
format1
->
initialCyclicShift
;
default:
return
-
1
;
}
return
-
1
;
}
NR_PUCCH_Resource_t
*
select_resource_by_id
(
int
resource_id
,
NR_PUCCH_Config_t
*
pucch_config
)
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
c5357e6a
...
...
@@ -139,7 +139,7 @@ int main(int argc, char **argv)
uint8_t
snr1set
=
0
;
float
roundStats
[
50
];
float
effRate
;
float
psnr
;
//
float psnr;
float
eff_tp_check
=
0
.
7
;
uint8_t
snrRun
;
uint32_t
TBS
;
...
...
@@ -696,7 +696,7 @@ int main(int argc, char **argv)
nr_ue_phy_config_request
(
&
UE_mac
->
phy_config
);
NR_UE_list_t
*
UE_list
=
&
RC
.
nrmac
[
0
]
->
UE_list
;
NR_COMMON_channels_t
*
cc
=
RC
.
nrmac
[
0
]
->
common_channels
;
//
NR_COMMON_channels_t *cc = RC.nrmac[0]->common_channels;
snrRun
=
0
;
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
.
2
)
{
...
...
@@ -924,7 +924,7 @@ int main(int argc, char **argv)
(
float
)
n_errors
/
(
float
)
n_trials
);
printf
(
"*****************************************
\n
"
);
printf
(
"
\n
"
);
printf
(
"SNR %f : n_errors (negative CRC) = %d/%d, Avg round %.2f, Channel BER %e, Eff Rate %.4f bits/slot, Eff Throughput %.2f
\%
, TBS %d bits/slot
\n
"
,
SNR
,
n_errors
,
n_trials
,
roundStats
[
snrRun
],(
double
)
errors_scrambling
/
available_bits
/
n_trials
,
effRate
,
effRate
/
TBS
*
100
,
TBS
);
printf
(
"SNR %f : n_errors (negative CRC) = %d/%d, Avg round %.2f, Channel BER %e, Eff Rate %.4f bits/slot, Eff Throughput %.2f, TBS %d bits/slot
\n
"
,
SNR
,
n_errors
,
n_trials
,
roundStats
[
snrRun
],(
double
)
errors_scrambling
/
available_bits
/
n_trials
,
effRate
,
effRate
/
TBS
*
100
,
TBS
);
printf
(
"
\n
"
);
if
(
n_trials
==
1
)
{
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
c5357e6a
...
...
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
UE_nr_rxtx_proc_t
UE_proc
;
FILE
*
scg_fd
=
NULL
;
int
ibwp
_size
=
24
;
int
ibwp
s
=
24
;
int
ibwp_rboffset
=
41
;
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[NR_ULSIM] Error, configuration module init failed
\n
"
);
...
...
@@ -618,7 +618,7 @@ int main(int argc, char **argv)
int
abwp_size
=
NRRIV2BW
(
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
int
abwp_start
=
NRRIV2PRBOFFSET
(
ubwp
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
int
ibwp_size
=
ibwp
_size
;
int
ibwp_size
=
ibwp
s
;
int
ibwp_start
=
ibwp_rboffset
;
if
(
msg3_flag
==
1
)
{
if
((
ibwp_start
<
abwp_start
)
||
(
ibwp_size
>
abwp_size
))
...
...
@@ -881,11 +881,10 @@ int main(int argc, char **argv)
if
(
n_trials
==
1
)
printf
(
"
\x1B
[31m""[frame %d][trial %d]
\t
number of errors in decoding = %u
\n
"
"
\x1B
[0m"
,
frame
,
trial
,
errors_decoding
);
}
}
// trial loop
printf
(
"*****************************************
\n
"
);
printf
(
"SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %u/%
d
\n
"
,
SNR
,
n_errors
,
n_trials
,
n_false_positive
,
n_trials
,
errors_scrambling
,
available_bits
*
n_trials
);
printf
(
"SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %u/%
u
\n
"
,
SNR
,
n_errors
,
n_trials
,
n_false_positive
,
n_trials
,
errors_scrambling
,
available_bits
*
n_trials
);
printf
(
"
\n
"
);
printf
(
"SNR %f: Channel BLER %e, Channel BER %e
\n
"
,
SNR
,(
double
)
n_errors
/
n_trials
,(
double
)
errors_scrambling
/
available_bits
/
n_trials
);
printf
(
"*****************************************
\n
"
);
...
...
@@ -916,7 +915,6 @@ int main(int argc, char **argv)
}
}
// SNR loop
printf
(
"
\n
"
);
free
(
test_input_bit
);
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
c5357e6a
...
...
@@ -1739,7 +1739,7 @@ uint8_t getRBGSize(uint16_t bwp_size, long rbg_size_config) {
if
(
bwp_size
<
37
)
return
(
rbg_size_config
?
4
:
2
);
if
(
bwp_size
<
73
)
return
(
rbg_size_config
?
8
:
4
);
if
(
bwp_size
<
145
)
return
(
rbg_size_config
?
16
:
8
);
if
(
bwp_size
<
276
)
return
16
;
else
return
16
;
}
uint8_t
getNRBG
(
uint16_t
bwp_size
,
uint16_t
bwp_start
,
long
rbg_size_config
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
c5357e6a
...
...
@@ -423,6 +423,7 @@ int configure_fapi_dl_pdu(int Mod_idP,
bwp
);
if
(
ret
<
0
)
{
LOG_I
(
MAC
,
"CCE list not empty, couldn't schedule PDSCH
\n
"
);
free
(
dci_pdu_rel15
);
return
(
0
);
}
...
...
@@ -463,6 +464,7 @@ int configure_fapi_dl_pdu(int Mod_idP,
pdsch_pdu_rel15
->
mcsIndex
[
0
],
TBS
);
free
(
dci_pdu_rel15
);
return
TBS
;
//Return TBS in bytes
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
c5357e6a
...
...
@@ -800,7 +800,6 @@ void fill_dci_pdu_rel15(NR_CellGroupConfig_t *secondaryCellGroup,
int
bwp_id
)
{
uint8_t
fsize
=
0
,
pos
=
0
;
uint8_t
nbits
=
0
;
for
(
int
d
=
0
;
d
<
pdcch_pdu_rel15
->
numDlDci
;
d
++
)
{
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
c5357e6a
...
...
@@ -118,6 +118,10 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, LTE_UE_CapabilityRAT_Container
rrc_add_nsa_user
(
rrc
,
ue_context_p
,
m
);
}
/* generate prototypes for the tree management functions (RB_INSERT used in rrc_add_nsa_user) */
RB_PROTOTYPE
(
rrc_nr_ue_tree_s
,
rrc_gNB_ue_context_s
,
entries
,
rrc_gNB_compare_ue_rnti_id
);
void
rrc_add_nsa_user
(
gNB_RRC_INST
*
rrc
,
struct
rrc_gNB_ue_context_s
*
ue_context_p
,
x2ap_ENDC_sgnb_addition_req_t
*
m
)
{
// generate nr-Config-r15 containers for LTE RRC : inside message for X2 EN-DC (CG-Config Message from 38.331)
rrc_gNB_carrier_data_t
*
carrier
=&
rrc
->
carrier
;
...
...
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