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
wangjie
OpenXG-RAN
Commits
d682c173
Commit
d682c173
authored
Nov 06, 2020
by
lfq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do dl and ul after msg2 is rcv
parent
87c83aaf
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
303 additions
and
29 deletions
+303
-29
openair1/PHY/CODING/nr_rate_matching.c
openair1/PHY/CODING/nr_rate_matching.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+9
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+3
-3
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+6
-2
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+5
-2
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+55
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+4
-3
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+13
-3
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+14
-6
openair2/LAYER2/NR_MAC_UE/rar_tools_nrUE.c
openair2/LAYER2/NR_MAC_UE/rar_tools_nrUE.c
+50
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+89
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+6
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+48
-2
No files found.
openair1/PHY/CODING/nr_rate_matching.c
View file @
d682c173
...
@@ -407,7 +407,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
...
@@ -407,7 +407,7 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
#ifdef RM_DEBUG
#ifdef RM_DEBUG
printf
(
"nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d
\n
"
,
E
,
F
,
Foffset
,
ind
,
Ncb
,
rvidx
);
printf
(
"nr_rate_matching_ldpc: E %d, F %d, Foffset %d, k0 %d, Ncb %d, rvidx %d
\n
"
,
E
,
F
,
Foffset
,
ind
,
Ncb
,
rvidx
);
#endif
#endif
AssertFatal
(
Foffset
<=
E
,
"Foffset %d > E %d
\n
"
,
Foffset
,
E
);
//
AssertFatal(Foffset <= E,"Foffset %d > E %d\n",Foffset,E);
AssertFatal
(
Foffset
<=
Ncb
,
"Foffset %d > Ncb %d
\n
"
,
Foffset
,
Ncb
);
AssertFatal
(
Foffset
<=
Ncb
,
"Foffset %d > Ncb %d
\n
"
,
Foffset
,
Ncb
);
if
(
ind
>=
Foffset
&&
ind
<
(
F
+
Foffset
))
ind
=
F
+
Foffset
;
if
(
ind
>=
Foffset
&&
ind
<
(
F
+
Foffset
))
ind
=
F
+
Foffset
;
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
d682c173
...
@@ -514,7 +514,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -514,7 +514,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
A
=
(
harq_process
->
TBS
)
<<
3
;
A
=
(
harq_process
->
TBS
)
<<
3
;
LOG_
D
(
PHY
,
"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d
\n
"
,
harq_pid
,
A
,
G
,
mcs
,
n_layers
,
nb_rb
,
Qm
,
n_layers
);
LOG_
I
(
PHY
,
"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d
\n
"
,
harq_pid
,
A
,
G
,
mcs
,
n_layers
,
nb_rb
,
Qm
,
n_layers
);
if
(
R
<
1024
)
if
(
R
<
1024
)
Coderate
=
(
float
)
R
/
(
float
)
1024
;
Coderate
=
(
float
)
R
/
(
float
)
1024
;
...
@@ -656,5 +656,13 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -656,5 +656,13 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
offset
+=
(
Kr_bytes
-
(
harq_process
->
F
>>
3
)
-
((
harq_process
->
C
>
1
)
?
3
:
0
));
offset
+=
(
Kr_bytes
-
(
harq_process
->
F
>>
3
)
-
((
harq_process
->
C
>
1
)
?
3
:
0
));
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
}
}
//log_dump(PHY, harq_process->b, 8, LOG_DUMP_CHAR,"gnb pusch rx frame %d %d: ", frame, nr_tti_rx);
LOG_I
(
PHY
,
"ULSCH Decoding C %d, A %d, G %d, E %d, Kb %d, F %d, Zc %d, Kr %d, BG %d
\n
"
,
harq_process
->
C
,
A
,
G
,
E
,
-
1
,
harq_process
->
F
,
harq_process
->
Z
,
Kr
,
p_decParams
->
BG
);
LOG_I
(
PHY
,
"ULSCH Decoding Kr_bytes %d, encLen %d
\n
"
,
Kr_bytes
,
(
3
*
8
*
Kr_bytes
)
+
12
);
return
1
;
return
1
;
}
}
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
d682c173
...
@@ -336,7 +336,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -336,7 +336,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process
->
G
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
dmrs_length
,
harq_process
->
Qm
,
harq_process
->
Nl
);
harq_process
->
G
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
dmrs_length
,
harq_process
->
Qm
,
harq_process
->
Nl
);
G
=
harq_process
->
G
;
G
=
harq_process
->
G
;
LOG_
D
(
PHY
,
"DLSCH Decoding, harq_pid %d TBS %d (%d) G %d nb_re_dmrs %d mcs %d Nl %d nb_symb_sch %d nb_rb %d
\n
"
,
harq_pid
,
A
,
A
/
8
,
G
,
nb_re_dmrs
,
harq_process
->
mcs
,
harq_process
->
Nl
,
nb_symb_sch
,
nb_rb
);
LOG_
I
(
PHY
,
"DLSCH Decoding, harq_pid %d TBS %d (%d) G %d nb_re_dmrs %d mcs %d Nl %d nb_symb_sch %d nb_rb %d
\n
"
,
harq_pid
,
A
,
A
/
8
,
G
,
nb_re_dmrs
,
harq_process
->
mcs
,
harq_process
->
Nl
,
nb_symb_sch
,
nb_rb
);
if
((
harq_process
->
R
)
<
1024
)
if
((
harq_process
->
R
)
<
1024
)
Coderate
=
(
float
)
(
harq_process
->
R
)
/
(
float
)
1024
;
Coderate
=
(
float
)
(
harq_process
->
R
)
/
(
float
)
1024
;
...
@@ -659,7 +659,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -659,7 +659,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
if
(
err_flag
==
1
)
{
if
(
err_flag
==
1
)
{
//#if UE_DEBUG_TRACE
//#if UE_DEBUG_TRACE
LOG_
D
(
PHY
,
"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d
\n
"
,
LOG_
I
(
PHY
,
"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d
\n
"
,
phy_vars_ue
->
Mod_id
,
frame
,
nr_tti_rx
,
harq_pid
,
harq_process
->
status
,
harq_process
->
round
,
harq_process
->
TBS
,
harq_process
->
mcs
,
Kr
,
r
,
harq_process
->
round
);
phy_vars_ue
->
Mod_id
,
frame
,
nr_tti_rx
,
harq_pid
,
harq_process
->
status
,
harq_process
->
round
,
harq_process
->
TBS
,
harq_process
->
mcs
,
Kr
,
r
,
harq_process
->
round
);
//#endif
//#endif
harq_process
->
harq_ack
.
ack
=
0
;
harq_process
->
harq_ack
.
ack
=
0
;
...
@@ -682,7 +682,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -682,7 +682,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
return
((
1
+
dlsch
->
max_ldpc_iterations
));
return
((
1
+
dlsch
->
max_ldpc_iterations
));
}
else
{
}
else
{
//#if UE_DEBUG_TRACE
//#if UE_DEBUG_TRACE
LOG_
D
(
PHY
,
"[UE %d] DLSCH: Setting ACK for nr_tti_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d
\n
"
,
LOG_
I
(
PHY
,
"[UE %d] DLSCH: Setting ACK for nr_tti_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d
\n
"
,
phy_vars_ue
->
Mod_id
,
nr_tti_rx
,
harq_process
->
TBS
,
harq_process
->
mcs
,
harq_process
->
nb_rb
,
harq_process
->
round
);
phy_vars_ue
->
Mod_id
,
nr_tti_rx
,
harq_process
->
TBS
,
harq_process
->
mcs
,
harq_process
->
nb_rb
,
harq_process
->
round
);
//#endif
//#endif
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
d682c173
...
@@ -427,9 +427,13 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
...
@@ -427,9 +427,13 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
generic_stat_bis
[
ue
->
current_thread_id
[
nr_tti_rx
]][
slot
]);
start_meas
(
&
ue
->
generic_stat_bis
[
ue
->
current_thread_id
[
nr_tti_rx
]][
slot
]);
#endif
#endif
if
(
first_symbol_flag
==
1
)
{
if
(
first_symbol_flag
==
1
)
{
if
(
beamforming_mode
==
0
){
if
(
beamforming_mode
==
0
){
if
(
dlsch0_harq
->
mimo_mode
<
NR_DUALSTREAM
)
{
if
(
dlsch0_harq
->
mimo_mode
<
NR_DUALSTREAM
)
{
write_output
(
"ch_estext_first.m"
,
"ch_estext"
,
&
pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
[
0
][
1
*
16
*
12
],
5
*
16
*
12
,
1
,
13
);
nr_dlsch_channel_level
(
pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
,
nr_dlsch_channel_level
(
pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
,
frame_parms
,
frame_parms
,
avg
,
avg
,
...
@@ -465,11 +469,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
...
@@ -465,11 +469,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
}
}
}
}
//#ifdef UE_DEBUG_TRACE
//#ifdef UE_DEBUG_TRACE
LOG_
D
(
PHY
,
"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)
\n
"
,
LOG_
I
(
PHY
,
"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d), mimo_mode %d, symbol %d
\n
"
,
frame
%
1024
,
nr_tti_rx
,
pdsch_vars
[
eNB_id
]
->
log2_maxh
,
frame
%
1024
,
nr_tti_rx
,
pdsch_vars
[
eNB_id
]
->
log2_maxh
,
pdsch_vars
[
eNB_id
]
->
log2_maxh0
,
pdsch_vars
[
eNB_id
]
->
log2_maxh0
,
pdsch_vars
[
eNB_id
]
->
log2_maxh1
,
pdsch_vars
[
eNB_id
]
->
log2_maxh1
,
avg
[
0
],
avgs
);
avg
[
0
],
avgs
,
dlsch0_harq
->
mimo_mode
,
symbol
);
//LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode);
//LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode);
//#endif
//#endif
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
View file @
d682c173
...
@@ -267,8 +267,8 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -267,8 +267,8 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING
,
VCD_FUNCTION_IN
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING
,
VCD_FUNCTION_IN
);
LOG_
D
(
PHY
,
"ulsch coding nb_rb %d, Nl = %d
\n
"
,
nb_rb
,
harq_process
->
pusch_pdu
.
nrOfLayers
);
LOG_
I
(
PHY
,
"ulsch coding nb_rb %d, Nl = %d
\n
"
,
nb_rb
,
harq_process
->
pusch_pdu
.
nrOfLayers
);
LOG_
D
(
PHY
,
"ulsch coding A %d G %d mod_order %d
\n
"
,
A
,
G
,
mod_order
);
LOG_
I
(
PHY
,
"ulsch coding A %d G %d mod_order %d
\n
"
,
A
,
G
,
mod_order
);
// if (harq_process->Ndi == 1) { // this is a new packet
// if (harq_process->Ndi == 1) { // this is a new packet
if
(
harq_process
->
round
==
0
)
{
// this is a new packet
if
(
harq_process
->
round
==
0
)
{
// this is a new packet
...
@@ -502,6 +502,9 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -502,6 +502,9 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
}
}
LOG_I
(
PHY
,
"ULSCH coding C %d, A %d, G %d, E %d, Kb %d, F %d, Zc %d, Kr %d, BG %d
\n
"
,
harq_process
->
C
,
A
,
G
,
E
,
Kb
,
F
,
*
pz
,
Kr
,
BG
);
LOG_I
(
PHY
,
"ULSCH coding Kr_bytes %d, encLen %d
\n
"
,
Kr
>>
3
,
(
3
*
Kr
)
+
12
);
memcpy
(
ulsch
->
g
,
harq_process
->
f
,
G
);
// g is the concatenated code block
memcpy
(
ulsch
->
g
,
harq_process
->
f
,
G
);
// g is the concatenated code block
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING
,
VCD_FUNCTION_OUT
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
d682c173
...
@@ -153,6 +153,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -153,6 +153,8 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
unsigned
int
G
=
nr_get_G
(
nb_rb
,
number_of_symbols
,
unsigned
int
G
=
nr_get_G
(
nb_rb
,
number_of_symbols
,
nb_dmrs_re_per_rb
,
number_dmrs_symbols
,
mod_order
,
Nl
);
nb_dmrs_re_per_rb
,
number_dmrs_symbols
,
mod_order
,
Nl
);
log_dump
(
PHY
,
harq_process_ul_ue
->
a
,
8
,
LOG_DUMP_CHAR
,
"nrue pusch tx frame %d %d: "
,
frame
,
slot
);
nr_ulsch_encoding
(
ulsch_ue
,
frame_parms
,
harq_pid
,
G
);
nr_ulsch_encoding
(
ulsch_ue
,
frame_parms
,
harq_pid
,
G
);
///////////
///////////
...
@@ -385,6 +387,59 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -385,6 +387,59 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
}
}
}
}
}
}
#if 0 // LOG_PUSCH_FREQ_DATA
static int log_data_first_freq = 0;
if (log_data_first_freq == 0)
{
log_data_first_freq = 1;
LOG_M("txdataF_freq.m","txF",txdataF[0],frame_parms->ofdm_symbol_size *5,1,1);
}
#endif
#define LOG_PUSCH_PARAMES
#ifdef LOG_PUSCH_PARAMES
static
int
islog
=
0
;
if
(
islog
==
0
)
{
//islog = 1;
LOG_I
(
MAC
,
"UE PUSCH PARAMS: rnti %d, bwpsize %d, bwpstart %d, subcarrier_spacing %d cyclic_prefix %d, Nid_cell %d
\n
"
,
pusch_pdu
->
rnti
,
-
1
,
//pusch_pdu->bwp_size,
-
1
,
//pusch_pdu->bwp_start,
-
1
,
//pusch_pdu->subcarrier_spacing,
-
1
,
//pusch_pdu->cyclic_prefix
ulsch_ue
->
Nid_cell
);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: target_code_rate %d, qam_mod_order %d, mcs_index %d, mcs_table %d , transform_precoding %d, data_scrambling_id %d
\n
"
,
-
1
,
//code_rate,
mod_order
,
-
1
,
//harq_process_ul_ue->mcs,
0
,
0
,
ulsch_ue
->
Nid_cell
);
//harq_process_ul_ue->data_scrambling_id);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: nrOfLayers %d, ul_dmrs_symb_pos %d dmrs_config_type %d, ul_dmrs_scrambling_id %d, scid %d, num_dmrs_cdm_grps_no_data %d
\n
"
,
pusch_pdu
->
nrOfLayers
,
pusch_pdu
->
ul_dmrs_symb_pos
,
pusch_pdu
->
dmrs_config_type
,
-
1
,
//harq_process_ul_ue->dmrs_scrambling_id[0],
-
1
,
//pusch_pdu->scid,
pusch_pdu
->
num_dmrs_cdm_grps_no_data
);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: dmrs_ports %d, resource_alloc %d, rb_start %d, rb_size %d, vrb_to_prb_mapping %d, frequency_hopping %d, tx_direct_current_location %d, uplink_frequency_shift_7p5khz %d, start_symbol_index %d, nr_of_symbols %d
\n
"
,
1
,
//pusch_pdu->dmrs_ports,
1
,
//pusch_pdu->resource_alloc,
pusch_pdu
->
rb_start
,
pusch_pdu
->
rb_size
,
-
1
,
//pusch_pdu->vrb_to_prb_mapping,
-
1
,
//pusch_pdu->frequency_hopping,
-
1
,
//pusch_pdu->tx_direct_current_location,
-
1
,
//pusch_pdu->uplink_frequency_shift_7p5khz,
pusch_pdu
->
start_symbol_index
,
pusch_pdu
->
nr_of_symbols
);
}
#endif
}
}
NR_UL_UE_HARQ_t
*
harq_process_ulsch
=
NULL
;
NR_UL_UE_HARQ_t
*
harq_process_ulsch
=
NULL
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
d682c173
...
@@ -245,7 +245,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
...
@@ -245,7 +245,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
// if all segments are done
// if all segments are done
if
(
rdata
->
nbSegments
==
ulsch_harq
->
processedSegments
)
{
if
(
rdata
->
nbSegments
==
ulsch_harq
->
processedSegments
)
{
if
(
decodeSuccess
)
{
if
(
decodeSuccess
)
{
LOG_
D
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d TBS %d
\n
"
,
LOG_
I
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d TBS %d
\n
"
,
gNB
->
Mod_id
,
ulsch_harq
->
slot
,
ulsch_harq
->
TBS
);
gNB
->
Mod_id
,
ulsch_harq
->
slot
,
ulsch_harq
->
TBS
);
ulsch_harq
->
status
=
SCH_IDLE
;
ulsch_harq
->
status
=
SCH_IDLE
;
ulsch_harq
->
round
=
0
;
ulsch_harq
->
round
=
0
;
...
@@ -253,8 +253,9 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
...
@@ -253,8 +253,9 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
LOG_D
(
PHY
,
"ULSCH received ok
\n
"
);
LOG_D
(
PHY
,
"ULSCH received ok
\n
"
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
0
);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
0
);
log_dump
(
PHY
,
ulsch_harq
->
b
,
8
,
LOG_DUMP_CHAR
,
"gnb pusch rx frame %d %d: "
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
);
}
else
{
}
else
{
LOG_
D
(
PHY
,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d
\n
"
,
LOG_
I
(
PHY
,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) r %d
\n
"
,
gNB
->
Mod_id
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
gNB
->
Mod_id
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
harq_pid
,
ulsch_harq
->
status
,
ulsch_harq
->
round
,
ulsch_harq
->
TBS
,
r
);
rdata
->
harq_pid
,
ulsch_harq
->
status
,
ulsch_harq
->
round
,
ulsch_harq
->
TBS
,
r
);
if
(
ulsch_harq
->
round
>=
ulsch
->
Mlimit
)
{
if
(
ulsch_harq
->
round
>=
ulsch
->
Mlimit
)
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
d682c173
...
@@ -355,6 +355,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -355,6 +355,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
//NR_FrequencyInfoDL_t *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL;
//NR_FrequencyInfoDL_t *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL;
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
=
mac
->
rach_ConfigDedicated
;
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
=
mac
->
rach_ConfigDedicated
;
int
prach_genarate
=
0
;
// int32_t frame_diff = 0;
// int32_t frame_diff = 0;
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
...
@@ -449,8 +450,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -449,8 +450,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Fill in preamble and PRACH resources
// Fill in preamble and PRACH resources
if
(
mac
->
generate_nr_prach
==
1
)
if
(
mac
->
generate_nr_prach
==
1
)
{
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
1
,
prach_resources
,
rach_ConfigDedicated
);
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
1
,
prach_resources
,
rach_ConfigDedicated
);
prach_genarate
=
1
;
}
offset
=
nr_generate_ulsch_pdu
((
uint8_t
*
)
mac_sdus
,
// sdus buffer
offset
=
nr_generate_ulsch_pdu
((
uint8_t
*
)
mac_sdus
,
// sdus buffer
(
uint8_t
*
)
payload
,
// UL MAC pdu pointer
(
uint8_t
*
)
payload
,
// UL MAC pdu pointer
num_sdus
,
// num sdus
num_sdus
,
// num sdus
...
@@ -495,7 +498,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -495,7 +498,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
// TbD Msg3 Retransmissions to be scheduled by DCI 0_0
// TbD Msg3 Retransmissions to be scheduled by DCI 0_0
mac
->
RA_active
=
0
;
//
mac->RA_active = 0;
mac
->
RA_window_cnt
=
-
1
;
mac
->
RA_window_cnt
=
-
1
;
mac
->
ra_state
=
RA_SUCCEEDED
;
mac
->
ra_state
=
RA_SUCCEEDED
;
mac
->
generate_nr_prach
=
2
;
mac
->
generate_nr_prach
=
2
;
...
@@ -576,7 +579,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -576,7 +579,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Fill in preamble and PRACH resources
// Fill in preamble and PRACH resources
if
(
mac
->
generate_nr_prach
==
1
)
if
(
mac
->
generate_nr_prach
==
1
)
{
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
0
,
prach_resources
,
rach_ConfigDedicated
);
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
0
,
prach_resources
,
rach_ConfigDedicated
);
prach_genarate
=
1
;
}
}
else
{
}
else
{
...
@@ -590,7 +596,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -590,7 +596,10 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Fill in preamble and PRACH resources
// Fill in preamble and PRACH resources
if
(
mac
->
generate_nr_prach
==
1
)
if
(
mac
->
generate_nr_prach
==
1
)
{
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
0
,
prach_resources
,
rach_ConfigDedicated
);
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
nr_tti_tx
,
0
,
prach_resources
,
rach_ConfigDedicated
);
prach_genarate
=
1
;
}
}
}
}
}
...
@@ -598,7 +607,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -598,7 +607,8 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
LOG_D
(
MAC
,
"[UE %d] FATAL: Should not have checked for RACH in PUSCH yet ..."
,
mod_id
);
LOG_D
(
MAC
,
"[UE %d] FATAL: Should not have checked for RACH in PUSCH yet ..."
,
mod_id
);
AssertFatal
(
1
==
0
,
""
);
AssertFatal
(
1
==
0
,
""
);
}
}
return
mac
->
generate_nr_prach
;
//return mac->generate_nr_prach;
return
prach_genarate
;
}
}
void
nr_get_RA_window
(
NR_UE_MAC_INST_t
*
mac
){
void
nr_get_RA_window
(
NR_UE_MAC_INST_t
*
mac
){
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
d682c173
...
@@ -774,9 +774,9 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
...
@@ -774,9 +774,9 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
*/
*/
}
}
}
else
if
(
ul_info
)
{
}
else
if
(
ul_info
)
{
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
ul_info
->
module_id
);
if
(
get_softmodem_params
()
->
phy_test
&&
ul_info
->
slot_tx
==
8
)
{
// ULSCH is handled only in phy-test mode (consistently with OAI gNB)
//
if (get_softmodem_params()->phy_test && ul_info->slot_tx == 8) { // ULSCH is handled only in phy-test mode (consistently with OAI gNB)
if
((
mac
->
ra_state
==
RA_SUCCEEDED
)
&&
(
ul_info
->
slot_tx
==
8
))
{
uint8_t
nb_dmrs_re_per_rb
;
uint8_t
nb_dmrs_re_per_rb
;
uint8_t
ulsch_input_buffer
[
MAX_ULSCH_PAYLOAD_BYTES
];
uint8_t
ulsch_input_buffer
[
MAX_ULSCH_PAYLOAD_BYTES
];
uint8_t
data_existing
=
0
;
uint8_t
data_existing
=
0
;
...
@@ -811,6 +811,14 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
...
@@ -811,6 +811,14 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
uint8_t
start_symbol_index
=
ulcfg_pdu
->
pusch_config_pdu
.
start_symbol_index
;
uint8_t
start_symbol_index
=
ulcfg_pdu
->
pusch_config_pdu
.
start_symbol_index
;
uint8_t
nrOfLayers
=
1
;
uint8_t
nrOfLayers
=
1
;
uint8_t
mcs_index
=
ulcfg_pdu
->
pusch_config_pdu
.
mcs_index
;
uint8_t
mcs_index
=
ulcfg_pdu
->
pusch_config_pdu
.
mcs_index
;
rb_size
=
106
;
rb_start
=
0
;
nr_of_symbols
=
11
;
start_symbol_index
=
0
;
mcs_index
=
9
;
uint8_t
mcs_table
=
ulcfg_pdu
->
pusch_config_pdu
.
mcs_table
;
uint8_t
mcs_table
=
ulcfg_pdu
->
pusch_config_pdu
.
mcs_table
;
uint8_t
harq_process_id
=
ulcfg_pdu
->
pusch_config_pdu
.
pusch_data
.
harq_process_id
;
uint8_t
harq_process_id
=
ulcfg_pdu
->
pusch_config_pdu
.
pusch_data
.
harq_process_id
;
uint8_t
rv_index
=
ulcfg_pdu
->
pusch_config_pdu
.
pusch_data
.
rv_index
;
uint8_t
rv_index
=
ulcfg_pdu
->
pusch_config_pdu
.
pusch_data
.
rv_index
;
...
@@ -831,10 +839,10 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
...
@@ -831,10 +839,10 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
#ifdef DEBUG_DCI
#ifdef DEBUG_DCI
LOG_I
(
MAC
,
" UL config params
\n
rnti: %x
\n
rb_size: %d
\n
"
,
LOG_I
(
MAC
,
" UL config params
\n
rnti: %x
\n
rb_size: %d
\n
"
,
rnti
,
rb_size
);
rnti
,
rb_size
);
LOG_I
(
MAC
,
"rb_start: %
x
\n
nr_of_symbols: %d
\n
start_symbol_index: %d
\n
nrOfLayers: %d
\n
mcs_index: %d
\n
\
LOG_I
(
MAC
,
"rb_start: %
d
\n
nr_of_symbols: %d
\n
start_symbol_index: %d
\n
nrOfLayers: %d
\n
mcs_index: %d
\n
\
mcs_table: %d
\n
harq_process_id: %d
\n
ndi: %d
\n
num_cb: %d
\n
rv_index: %d
\n
"
,
mcs_table: %d
\n
harq_process_id: %d
\n
ndi: %d
\n
num_cb: %d
\n
rv_index: %d
\n
"
,
rb_start
,
nr_of_symbols
,
start_symbol_index
,
nrOfLayers
,
mcs_index
,
rb_start
,
nr_of_symbols
,
start_symbol_index
,
nrOfLayers
,
mcs_index
,
mcs_table
,
harq_process_id
,
ndi
,
num_cb
,
rv_index
);
mcs_table
,
harq_process_id
,
-
1
,
-
1
,
rv_index
);
#endif
#endif
// PTRS ports configuration
// PTRS ports configuration
...
@@ -997,7 +1005,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
...
@@ -997,7 +1005,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
}
}
//}
//}
LOG_
D
(
MAC
,
"[UE %d] Frame %d, Subframe %d Adding Msg3 UL Config Request for rnti: %x
\n
"
,
LOG_
I
(
MAC
,
"[UE %d] Frame %d, Subframe %d Adding Msg3 UL Config Request for rnti: %x
\n
"
,
ul_info
->
module_id
,
ul_info
->
module_id
,
ul_info
->
frame_tx
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
slot_tx
,
...
...
openair2/LAYER2/NR_MAC_UE/rar_tools_nrUE.c
View file @
d682c173
...
@@ -194,6 +194,52 @@ void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac,
...
@@ -194,6 +194,52 @@ void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac,
0
,
// TBR to verify tb scaling
0
,
// TBR to verify tb scaling
pusch_config_pdu
->
nrOfLayers
)
/
8
;
pusch_config_pdu
->
nrOfLayers
)
/
8
;
#define LOG_PUSCH_PARAMES
#ifdef LOG_PUSCH_PARAMES
static
int
islog
=
0
;
if
(
islog
==
0
)
{
//islog = 1;
LOG_I
(
MAC
,
"UE PUSCH PARAMS: rnti %d, bwpsize %d, bwpstart %d, subcarrier_spacing %d cyclic_prefix %d, Nid_cell %d
\n
"
,
pusch_config_pdu
->
rnti
,
pusch_config_pdu
->
bwp_size
,
pusch_config_pdu
->
bwp_start
,
pusch_config_pdu
->
subcarrier_spacing
,
-
1
,
//pusch_pdu->cyclic_prefix
*
scc
->
physCellId
);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: target_code_rate %d, qam_mod_order %d, mcs_index %d, mcs_table %d , transform_precoding %d, data_scrambling_id %d
\n
"
,
pusch_config_pdu
->
target_code_rate
,
pusch_config_pdu
->
qam_mod_order
,
pusch_config_pdu
->
mcs_index
,
pusch_config_pdu
->
mcs_table
,
pusch_config_pdu
->
transform_precoding
,
pusch_config_pdu
->
data_scrambling_id
);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: nrOfLayers %d, ul_dmrs_symb_pos %d dmrs_config_type %d, ul_dmrs_scrambling_id %d, scid %d, num_dmrs_cdm_grps_no_data %d
\n
"
,
pusch_config_pdu
->
nrOfLayers
,
pusch_config_pdu
->
ul_dmrs_symb_pos
,
pusch_config_pdu
->
dmrs_config_type
,
pusch_config_pdu
->
ul_dmrs_scrambling_id
,
-
1
,
//pusch_pdu->scid,
pusch_config_pdu
->
num_dmrs_cdm_grps_no_data
);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: dmrs_ports %d, resource_alloc %d, rb_start %d, rb_size %d, vrb_to_prb_mapping %d, frequency_hopping %d, tx_direct_current_location %d, uplink_frequency_shift_7p5khz %d, start_symbol_index %d, nr_of_symbols %d
\n
"
,
pusch_config_pdu
->
dmrs_ports
,
pusch_config_pdu
->
resource_alloc
,
pusch_config_pdu
->
rb_start
,
pusch_config_pdu
->
rb_size
,
pusch_config_pdu
->
vrb_to_prb_mapping
,
-
1
,
//pusch_pdu->frequency_hopping,
-
1
,
//pusch_pdu->tx_direct_current_location,
pusch_config_pdu
->
uplink_frequency_shift_7p5khz
,
pusch_config_pdu
->
start_symbol_index
,
pusch_config_pdu
->
nr_of_symbols
);
}
#endif
}
}
/////////////////////////////////////
/////////////////////////////////////
...
@@ -320,17 +366,17 @@ uint16_t nr_ue_process_rar(module_id_t mod_id,
...
@@ -320,17 +366,17 @@ uint16_t nr_ue_process_rar(module_id_t mod_id,
// frequency hopping
// frequency hopping
freq_hopping
=
(
unsigned
char
)
(
rar
->
UL_GRANT_1
>>
2
);
freq_hopping
=
(
unsigned
char
)
(
rar
->
UL_GRANT_1
>>
2
);
#ifdef DEBUG_RAR
//
#ifdef DEBUG_RAR
LOG_
D
(
MAC
,
"[DEBUG_RAR] Received RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d csi_req %d t_crnti %x
\n
"
,
LOG_
I
(
MAC
,
"[DEBUG_RAR] Received RAR with t_alloc %d f_alloc %d ta_command %d mcs %d freq_hopping %d tpc_command %d csi_req %d t_crnti %x
\n
"
,
Msg3_t_alloc
,
Msg3_t_alloc
,
Msg3_f_alloc
,
Msg3_f_alloc
,
ta_command
,
ta_command
,
mcs
,
mcs
,
freq_hopping
,
freq_hopping
,
tpc_command
,
tpc_command
,
csi_req
,
-
1
,
//
csi_req,
ue_mac
->
t_crnti
);
ue_mac
->
t_crnti
);
#endif
//
#endif
// Config Msg3 PDU
// Config Msg3 PDU
nr_config_Msg3_pdu
(
ue_mac
,
Msg3_f_alloc
,
Msg3_t_alloc
,
mcs
,
freq_hopping
);
nr_config_Msg3_pdu
(
ue_mac
,
Msg3_f_alloc
,
Msg3_t_alloc
,
mcs
,
freq_hopping
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
d682c173
...
@@ -708,6 +708,46 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
...
@@ -708,6 +708,46 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
// calling function to fill rar message
// calling function to fill rar message
nr_fill_rar
(
module_idP
,
ra
,
cc
->
RAR_pdu
.
payload
,
pusch_pdu
);
nr_fill_rar
(
module_idP
,
ra
,
cc
->
RAR_pdu
.
payload
,
pusch_pdu
);
#if 1 //#ifdef LOG_PUSCH_PARAMES
static
int
log_first
=
0
;
if
(
log_first
==
0
)
{
log_first
=
1
;
LOG_I
(
MAC
,
"pusch configure: rnti %d, bwpsize %d, bwpstart %d, subcarrier_spacing %d cyclic_prefix %d
\n
"
,
pusch_pdu
->
rnti
,
pusch_pdu
->
bwp_size
,
pusch_pdu
->
bwp_start
,
pusch_pdu
->
subcarrier_spacing
,
pusch_pdu
->
cyclic_prefix
);
LOG_I
(
MAC
,
"pusch configure: target_code_rate %d, qam_mod_order %d, mcs_index %d, mcs_table %d , transform_precoding %d, data_scrambling_id %d
\n
"
,
pusch_pdu
->
target_code_rate
,
pusch_pdu
->
qam_mod_order
,
pusch_pdu
->
mcs_index
,
pusch_pdu
->
mcs_table
,
pusch_pdu
->
transform_precoding
,
pusch_pdu
->
data_scrambling_id
);
LOG_I
(
MAC
,
"pusch configure: nrOfLayers %d, ul_dmrs_symb_pos %d dmrs_config_type %d, ul_dmrs_scrambling_id %d, scid %d, num_dmrs_cdm_grps_no_data %d
\n
"
,
pusch_pdu
->
nrOfLayers
,
pusch_pdu
->
ul_dmrs_symb_pos
,
pusch_pdu
->
dmrs_config_type
,
pusch_pdu
->
ul_dmrs_scrambling_id
,
pusch_pdu
->
scid
,
pusch_pdu
->
num_dmrs_cdm_grps_no_data
);
LOG_I
(
MAC
,
"pusch configure: dmrs_ports %d, resource_alloc %d, rb_start %d, rb_size %d, vrb_to_prb_mapping %d, frequency_hopping %d, tx_direct_current_location %d, uplink_frequency_shift_7p5khz %d, start_symbol_index %d, nr_of_symbols %d
\n
"
,
pusch_pdu
->
dmrs_ports
,
pusch_pdu
->
resource_alloc
,
pusch_pdu
->
rb_start
,
pusch_pdu
->
rb_size
,
pusch_pdu
->
vrb_to_prb_mapping
,
pusch_pdu
->
frequency_hopping
,
pusch_pdu
->
tx_direct_current_location
,
pusch_pdu
->
uplink_frequency_shift_7p5khz
,
pusch_pdu
->
start_symbol_index
,
pusch_pdu
->
nr_of_symbols
);
}
#endif
}
}
// WIP
// WIP
...
@@ -822,7 +862,7 @@ void nr_generate_Msg2(module_id_t module_idP,
...
@@ -822,7 +862,7 @@ void nr_generate_Msg2(module_id_t module_idP,
pdsch_pdu_rel15
->
dmrsPorts
=
1
;
pdsch_pdu_rel15
->
dmrsPorts
=
1
;
pdsch_pdu_rel15
->
resourceAlloc
=
1
;
pdsch_pdu_rel15
->
resourceAlloc
=
1
;
pdsch_pdu_rel15
->
rbStart
=
0
;
pdsch_pdu_rel15
->
rbStart
=
0
;
pdsch_pdu_rel15
->
rbSize
=
6
;
pdsch_pdu_rel15
->
rbSize
=
1
6
;
pdsch_pdu_rel15
->
VRBtoPRBMapping
=
0
;
// non interleaved
pdsch_pdu_rel15
->
VRBtoPRBMapping
=
0
;
// non interleaved
for
(
int
i
=
0
;
i
<
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
count
;
i
++
)
{
...
@@ -925,7 +965,54 @@ void nr_generate_Msg2(module_id_t module_idP,
...
@@ -925,7 +965,54 @@ void nr_generate_Msg2(module_id_t module_idP,
uint8_t
*
vrb_map
=
cc
[
CC_id
].
vrb_map
;
uint8_t
*
vrb_map
=
cc
[
CC_id
].
vrb_map
;
for
(
int
rb
=
0
;
rb
<
pdsch_pdu_rel15
->
rbSize
;
rb
++
)
for
(
int
rb
=
0
;
rb
<
pdsch_pdu_rel15
->
rbSize
;
rb
++
)
vrb_map
[
rb
+
pdsch_pdu_rel15
->
rbStart
]
=
1
;
vrb_map
[
rb
+
pdsch_pdu_rel15
->
rbStart
]
=
1
;
#if 1 // LOG_PDSCH_PARAMES
static
int
log_first_pdsch_ra
=
0
;
if
(
log_first_pdsch_ra
==
0
)
{
//log_first_pdsch_ra = 1;
LOG_I
(
MAC
,
"NB PDSCH PARAMS: RA rnti %d, bwp (%d, %d), scs %d, codewords %d, coderate %d, mod %d, mcs (%d, %d), rv %d, dataScramId %d, layers %d, tm %d, refPoint %d
\n
"
,
pdsch_pdu_rel15
->
rnti
,
pdsch_pdu_rel15
->
BWPSize
,
pdsch_pdu_rel15
->
BWPStart
,
pdsch_pdu_rel15
->
SubcarrierSpacing
,
pdsch_pdu_rel15
->
NrOfCodewords
,
pdsch_pdu_rel15
->
targetCodeRate
[
0
],
pdsch_pdu_rel15
->
qamModOrder
[
0
],
pdsch_pdu_rel15
->
mcsIndex
[
0
],
pdsch_pdu_rel15
->
mcsTable
[
0
],
pdsch_pdu_rel15
->
rvIndex
[
0
],
pdsch_pdu_rel15
->
dataScramblingId
,
pdsch_pdu_rel15
->
nrOfLayers
,
pdsch_pdu_rel15
->
transmissionScheme
,
pdsch_pdu_rel15
->
refPoint
);
LOG_I
(
MAC
,
"NB PDSCH PARAMS: RA dlDmrsScramblingId %d, scid %d, numDmrsCdmGrpsNoData %d, dmrsPorts %d, resourceAlloc %d, rb (%d, %d), symb (%d, %d), dmrsType %d, dmrsPos %d, vrb2prb %d
\n
"
,
pdsch_pdu_rel15
->
dlDmrsScramblingId
,
pdsch_pdu_rel15
->
SCID
,
pdsch_pdu_rel15
->
numDmrsCdmGrpsNoData
,
pdsch_pdu_rel15
->
dmrsPorts
,
pdsch_pdu_rel15
->
resourceAlloc
,
pdsch_pdu_rel15
->
rbStart
,
pdsch_pdu_rel15
->
rbSize
,
pdsch_pdu_rel15
->
StartSymbolIndex
,
pdsch_pdu_rel15
->
NrOfSymbols
,
pdsch_pdu_rel15
->
dmrsConfigType
,
pdsch_pdu_rel15
->
dlDmrsSymbPos
,
pdsch_pdu_rel15
->
VRBtoPRBMapping
);
}
}
#endif
}
}
}
void
nr_clear_ra_proc
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
){
void
nr_clear_ra_proc
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
){
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
d682c173
...
@@ -499,6 +499,12 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
...
@@ -499,6 +499,12 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
lcid
,
lcid
,
0
,
0
,
0
);
0
);
LOG_I
(
MAC
,
"%d.%d, DTCH%d->DLSCH, RLC status %d bytes
\n
"
,
frame
,
slot
,
lcid
,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
);
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
if
(
sched_ctrl
->
num_total_bytes
==
0
&&
!
get_softmodem_params
()
->
phy_test
)
if
(
sched_ctrl
->
num_total_bytes
==
0
&&
!
get_softmodem_params
()
->
phy_test
)
return
;
return
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
d682c173
...
@@ -889,7 +889,7 @@ void schedule_fapi_ul_pdu(int Mod_idP,
...
@@ -889,7 +889,7 @@ void schedule_fapi_ul_pdu(int Mod_idP,
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
pusch_sched
->
pusch_pdu
;
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
pusch_sched
->
pusch_pdu
;
memset
(
pusch_pdu
,
0
,
sizeof
(
nfapi_nr_pusch_pdu_t
));
memset
(
pusch_pdu
,
0
,
sizeof
(
nfapi_nr_pusch_pdu_t
));
LOG_
D
(
MAC
,
"Scheduling UE specific PUSCH
\n
"
);
LOG_
I
(
MAC
,
"Scheduling UE specific PUSCH
\n
"
);
//UL_tti_req = &nr_mac->UL_tti_req[CC_id];
//UL_tti_req = &nr_mac->UL_tti_req[CC_id];
int
dci_formats
[
2
];
int
dci_formats
[
2
];
...
@@ -1126,7 +1126,7 @@ void schedule_fapi_ul_pdu(int Mod_idP,
...
@@ -1126,7 +1126,7 @@ void schedule_fapi_ul_pdu(int Mod_idP,
UL_dci_req
->
numPdus
+=
1
;
UL_dci_req
->
numPdus
+=
1
;
LOG_
D
(
MAC
,
"Configuring ULDCI/PDCCH in %d.%d
\n
"
,
frameP
,
slotP
);
LOG_
I
(
MAC
,
"Configuring ULDCI/PDCCH in %d.%d
\n
"
,
frameP
,
slotP
);
uint8_t
nr_of_candidates
,
aggregation_level
;
uint8_t
nr_of_candidates
,
aggregation_level
;
find_aggregation_candidates
(
&
aggregation_level
,
&
nr_of_candidates
,
ss
);
find_aggregation_candidates
(
&
aggregation_level
,
&
nr_of_candidates
,
ss
);
...
@@ -1163,6 +1163,52 @@ void schedule_fapi_ul_pdu(int Mod_idP,
...
@@ -1163,6 +1163,52 @@ void schedule_fapi_ul_pdu(int Mod_idP,
fill_dci_pdu_rel15
(
scc
,
secondaryCellGroup
,
pdcch_pdu_rel15
,
dci_pdu_rel15
,
dci_formats
,
rnti_types
,
pusch_pdu
->
bwp_size
,
bwp_id
);
fill_dci_pdu_rel15
(
scc
,
secondaryCellGroup
,
pdcch_pdu_rel15
,
dci_pdu_rel15
,
dci_formats
,
rnti_types
,
pusch_pdu
->
bwp_size
,
bwp_id
);
free
(
dci_pdu_rel15
);
free
(
dci_pdu_rel15
);
}
}
#define LOG_PUSCH_PARAMES
#ifdef LOG_PUSCH_PARAMES
static
int
islog
=
0
;
if
(
islog
==
0
)
{
//islog = 1;
LOG_I
(
MAC
,
"UE PUSCH PARAMS: frame %d, %d , rnti %d, bwpsize %d, bwpstart %d, subcarrier_spacing %d cyclic_prefix %d, Nid_cell %d, num_slots_per_tdd %d
\n
"
,
pusch_sched
->
frame
,
pusch_sched
->
slot
,
pusch_pdu
->
rnti
,
pusch_pdu
->
bwp_size
,
pusch_pdu
->
bwp_start
,
pusch_pdu
->
subcarrier_spacing
,
-
1
,
//pusch_pdu->cyclic_prefix
*
scc
->
physCellId
,
num_slots_per_tdd
);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: target_code_rate %d, qam_mod_order %d, mcs_index %d, mcs_table %d , transform_precoding %d, data_scrambling_id %d
\n
"
,
pusch_pdu
->
target_code_rate
,
pusch_pdu
->
qam_mod_order
,
pusch_pdu
->
mcs_index
,
pusch_pdu
->
mcs_table
,
pusch_pdu
->
transform_precoding
,
pusch_pdu
->
data_scrambling_id
);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: nrOfLayers %d, ul_dmrs_symb_pos %d dmrs_config_type %d, ul_dmrs_scrambling_id %d, scid %d, num_dmrs_cdm_grps_no_data %d
\n
"
,
pusch_pdu
->
nrOfLayers
,
pusch_pdu
->
ul_dmrs_symb_pos
,
pusch_pdu
->
dmrs_config_type
,
pusch_pdu
->
ul_dmrs_scrambling_id
,
-
1
,
//pusch_pdu->scid,
pusch_pdu
->
num_dmrs_cdm_grps_no_data
);
LOG_I
(
MAC
,
"UE PUSCH PARAMS: dmrs_ports %d, resource_alloc %d, rb_start %d, rb_size %d, vrb_to_prb_mapping %d, frequency_hopping %d, tx_direct_current_location %d, uplink_frequency_shift_7p5khz %d, start_symbol_index %d, nr_of_symbols %d
\n
"
,
pusch_pdu
->
dmrs_ports
,
pusch_pdu
->
resource_alloc
,
pusch_pdu
->
rb_start
,
pusch_pdu
->
rb_size
,
pusch_pdu
->
vrb_to_prb_mapping
,
-
1
,
//pusch_pdu->frequency_hopping,
-
1
,
//pusch_pdu->tx_direct_current_location,
pusch_pdu
->
uplink_frequency_shift_7p5khz
,
pusch_pdu
->
start_symbol_index
,
pusch_pdu
->
nr_of_symbols
);
}
#endif
}
}
}
}
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