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
常顺宇
OpenXG-RAN
Commits
8b113b00
Commit
8b113b00
authored
Apr 20, 2021
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove/refactor LOGs
parent
ef8aaa8c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
30 additions
and
31 deletions
+30
-31
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+6
-7
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-2
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+2
-2
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+9
-9
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+6
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+2
-2
No files found.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
8b113b00
...
@@ -173,7 +173,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -173,7 +173,6 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
pucch_GroupHopping_t
pucch_GroupHopping
=
pucch_pdu
->
group_hop_flag
+
(
pucch_pdu
->
sequence_hop_flag
<<
1
);
pucch_GroupHopping_t
pucch_GroupHopping
=
pucch_pdu
->
group_hop_flag
+
(
pucch_pdu
->
sequence_hop_flag
<<
1
);
AssertFatal
(
pucch_pdu
->
bit_len_harq
>
0
||
pucch_pdu
->
sr_flag
>
0
,
AssertFatal
(
pucch_pdu
->
bit_len_harq
>
0
||
pucch_pdu
->
sr_flag
>
0
,
"Either bit_len_harq (%d) or sr_flag (%d) must be > 0
\n
"
,
"Either bit_len_harq (%d) or sr_flag (%d) must be > 0
\n
"
,
pucch_pdu
->
bit_len_harq
,
pucch_pdu
->
sr_flag
);
pucch_pdu
->
bit_len_harq
,
pucch_pdu
->
sr_flag
);
...
@@ -191,7 +190,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -191,7 +190,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
nr_sequences
=
8
>>
(
1
-
pucch_pdu
->
sr_flag
);
nr_sequences
=
8
>>
(
1
-
pucch_pdu
->
sr_flag
);
}
}
LOG_
I
(
PHY
,
"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d
\n
"
,
pucch_pdu
->
nr_of_symbols
,
pucch_pdu
->
start_symbol_index
,
pucch_pdu
->
prb_start
,
pucch_pdu
->
second_hop_prb
,
pucch_pdu
->
group_hop_flag
,
pucch_pdu
->
sequence_hop_flag
,
pucch_pdu
->
bit_len_harq
,
pucch_pdu
->
sr_flag
,
mcs
[
0
]);
LOG_
D
(
PHY
,
"pucch0: nr_symbols %d, start_symbol %d, prb_start %d, second_hop_prb %d, group_hop_flag %d, sequence_hop_flag %d, O_ACK %d, O_SR %d, mcs %d
\n
"
,
pucch_pdu
->
nr_of_symbols
,
pucch_pdu
->
start_symbol_index
,
pucch_pdu
->
prb_start
,
pucch_pdu
->
second_hop_prb
,
pucch_pdu
->
group_hop_flag
,
pucch_pdu
->
sequence_hop_flag
,
pucch_pdu
->
bit_len_harq
,
pucch_pdu
->
sr_flag
,
mcs
[
0
]);
int
cs_ind
=
get_pucch0_cs_lut_index
(
gNB
,
pucch_pdu
);
int
cs_ind
=
get_pucch0_cs_lut_index
(
gNB
,
pucch_pdu
);
/*
/*
...
@@ -227,12 +226,12 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -227,12 +226,12 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
int
prb_offset
[
2
]
=
{
pucch_pdu
->
bwp_start
+
pucch_pdu
->
prb_start
,
pucch_pdu
->
bwp_start
+
pucch_pdu
->
prb_start
};
int
prb_offset
[
2
]
=
{
pucch_pdu
->
bwp_start
+
pucch_pdu
->
prb_start
,
pucch_pdu
->
bwp_start
+
pucch_pdu
->
prb_start
};
nr_group_sequence_hopping
(
pucch_GroupHopping
,
pucch_pdu
->
hopping_id
,
0
,
slot
,
&
u
[
0
],
&
v
[
0
]);
// calculating u and v value first hop
nr_group_sequence_hopping
(
pucch_GroupHopping
,
pucch_pdu
->
hopping_id
,
0
,
slot
,
&
u
[
0
],
&
v
[
0
]);
// calculating u and v value first hop
LOG_
I
(
PHY
,
"pucch0: u %d, v %d
\n
"
,
u
[
0
],
v
[
0
]);
LOG_
D
(
PHY
,
"pucch0: u %d, v %d
\n
"
,
u
[
0
],
v
[
0
]);
if
(
pucch_pdu
->
freq_hop_flag
==
1
)
{
if
(
pucch_pdu
->
freq_hop_flag
==
1
)
{
nr_group_sequence_hopping
(
pucch_GroupHopping
,
pucch_pdu
->
hopping_id
,
1
,
slot
,
&
u
[
1
],
&
v
[
1
]);
// calculating u and v value second hop
nr_group_sequence_hopping
(
pucch_GroupHopping
,
pucch_pdu
->
hopping_id
,
1
,
slot
,
&
u
[
1
],
&
v
[
1
]);
// calculating u and v value second hop
LOG_
I
(
PHY
,
"pucch0 second hop: u %d, v %d
\n
"
,
u
[
1
],
v
[
1
]);
LOG_
D
(
PHY
,
"pucch0 second hop: u %d, v %d
\n
"
,
u
[
1
],
v
[
1
]);
prb_offset
[
1
]
=
pucch_pdu
->
bwp_start
+
pucch_pdu
->
second_hop_prb
;
prb_offset
[
1
]
=
pucch_pdu
->
bwp_start
+
pucch_pdu
->
second_hop_prb
;
}
}
...
@@ -291,10 +290,10 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -291,10 +290,10 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
}
}
}
}
//
#ifdef DEBUG_NR_PUCCH_RX
#ifdef DEBUG_NR_PUCCH_RX
LOG_I
(
PHY
,
"PUCCH IDFT = (%d,%d)=>%f
\n
"
,
corr_re
[
0
],
corr_im
[
0
],
10
*
log10
((
double
)
corr_re
[
0
]
*
corr_re
[
0
]
+
(
double
)
corr_im
[
0
]
*
corr_im
[
0
]));
LOG_I
(
PHY
,
"PUCCH IDFT = (%d,%d)=>%f
\n
"
,
corr_re
[
0
],
corr_im
[
0
],
10
*
log10
((
double
)
corr_re
[
0
]
*
corr_re
[
0
]
+
(
double
)
corr_im
[
0
]
*
corr_im
[
0
]));
if
(
l
>
1
)
LOG_I
(
PHY
,
"PUCCH 2nd symbol IDFT[%d/%d] = (%d,%d)=>%f
\n
"
,
mcs
[
i
],
seq_index
,
corr_re
[
1
],
corr_im
[
1
],
10
*
log10
((
double
)
corr_re
[
1
]
*
corr_re
[
1
]
+
(
double
)
corr_im
[
1
]
*
corr_im
[
1
]));
if
(
l
>
1
)
LOG_I
(
PHY
,
"PUCCH 2nd symbol IDFT[%d/%d] = (%d,%d)=>%f
\n
"
,
mcs
[
i
],
seq_index
,
corr_re
[
1
],
corr_im
[
1
],
10
*
log10
((
double
)
corr_re
[
1
]
*
corr_re
[
1
]
+
(
double
)
corr_im
[
1
]
*
corr_im
[
1
]));
//
#endif
#endif
if
(
pucch_pdu
->
freq_hop_flag
==
0
&&
l
==
1
)
// non-coherent correlation
if
(
pucch_pdu
->
freq_hop_flag
==
0
&&
l
==
1
)
// non-coherent correlation
temp
=
(
int64_t
)
corr_re
[
0
]
*
corr_re
[
0
]
+
(
int64_t
)
corr_im
[
0
]
*
corr_im
[
0
];
temp
=
(
int64_t
)
corr_re
[
0
]
*
corr_re
[
0
]
+
(
int64_t
)
corr_im
[
0
]
*
corr_im
[
0
];
else
if
(
pucch_pdu
->
freq_hop_flag
==
0
&&
l
==
2
)
{
else
if
(
pucch_pdu
->
freq_hop_flag
==
0
&&
l
==
2
)
{
...
@@ -363,7 +362,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
...
@@ -363,7 +362,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu
->
harq
->
harq_confidence_level
=
(
no_conf
)
?
1
:
0
;
uci_pdu
->
harq
->
harq_confidence_level
=
(
no_conf
)
?
1
:
0
;
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
1
);
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
1
);
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
index
&
0x01
;
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
index
&
0x01
;
LOG_
I
(
PHY
,
"Slot %d HARQ value %d with confidence level (0 is good, 1 is bad) %d xrt_mag %d
\n
"
,
LOG_
D
(
PHY
,
"Slot %d HARQ value %d with confidence level (0 is good, 1 is bad) %d xrt_mag %d
\n
"
,
slot
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
,
uci_pdu
->
harq
->
harq_confidence_level
,
xrtmag_dB
);
slot
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
,
uci_pdu
->
harq
->
harq_confidence_level
,
xrtmag_dB
);
if
(
pucch_pdu
->
sr_flag
==
1
)
{
if
(
pucch_pdu
->
sr_flag
==
1
)
{
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
View file @
8b113b00
...
@@ -180,11 +180,11 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
...
@@ -180,11 +180,11 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
ue
->
measurements
.
wideband_cqi_avg
[
gNB_id
]
=
dB_fixed2
(
ue
->
measurements
.
rx_power_avg
[
gNB_id
],
ue
->
measurements
.
n0_power_avg
);
ue
->
measurements
.
wideband_cqi_avg
[
gNB_id
]
=
dB_fixed2
(
ue
->
measurements
.
rx_power_avg
[
gNB_id
],
ue
->
measurements
.
n0_power_avg
);
ue
->
measurements
.
rx_rssi_dBm
[
gNB_id
]
=
ue
->
measurements
.
rx_power_avg_dB
[
gNB_id
]
+
30
-
10
*
log10
(
pow
(
2
,
30
))
-
((
int
)
openair0_cfg
[
0
].
rx_gain
[
0
]
-
(
int
)
openair0_cfg
[
0
].
rx_gain_offset
[
0
])
-
dB_fixed
(
ue
->
frame_parms
.
ofdm_symbol_size
);
ue
->
measurements
.
rx_rssi_dBm
[
gNB_id
]
=
ue
->
measurements
.
rx_power_avg_dB
[
gNB_id
]
+
30
-
10
*
log10
(
pow
(
2
,
30
))
-
((
int
)
openair0_cfg
[
0
].
rx_gain
[
0
]
-
(
int
)
openair0_cfg
[
0
].
rx_gain_offset
[
0
])
-
dB_fixed
(
ue
->
frame_parms
.
ofdm_symbol_size
);
LOG_
I
(
PHY
,
"[gNB %d] Slot %d, RSSI %d dBm/RE, RSSI (digital) %d dB, WBandCQI %d dB, rxPwrAvg %d, n0PwrAvg %d
\n
"
,
LOG_
D
(
PHY
,
"[gNB %d] Slot %d, RSSI %d dB (%d dBm/RE), WBandCQI %d dB, rxPwrAvg %d, n0PwrAvg %d
\n
"
,
gNB_id
,
gNB_id
,
slot
,
slot
,
ue
->
measurements
.
rx_rssi_dBm
[
gNB_id
],
ue
->
measurements
.
rx_power_avg_dB
[
gNB_id
],
ue
->
measurements
.
rx_power_avg_dB
[
gNB_id
],
ue
->
measurements
.
rx_rssi_dBm
[
gNB_id
],
ue
->
measurements
.
wideband_cqi_avg
[
gNB_id
],
ue
->
measurements
.
wideband_cqi_avg
[
gNB_id
],
ue
->
measurements
.
rx_power_avg
[
gNB_id
],
ue
->
measurements
.
rx_power_avg
[
gNB_id
],
ue
->
measurements
.
n0_power_tot
);
ue
->
measurements
.
n0_power_tot
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
8b113b00
...
@@ -679,8 +679,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -679,8 +679,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
else
{
else
{
LOG_D
(
PHY
,
"CRC NOT OK
\n\033
[0m"
);
LOG_D
(
PHY
,
"CRC NOT OK
\n\033
[0m"
);
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
dump_nrdlsch
(
phy_vars_ue
,
0
,
nr_slot_rx
,
&
E
,
0
,
0
);
//
dump_nrdlsch(phy_vars_ue,0,nr_slot_rx,&E,0,0);
exit
(
-
1
);
//
exit(-1);
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
View file @
8b113b00
...
@@ -112,9 +112,9 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
...
@@ -112,9 +112,9 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
}
}
for
(
int
l
=
0
;
l
<
nrofSymbols
;
l
++
)
{
for
(
int
l
=
0
;
l
<
nrofSymbols
;
l
++
)
{
alpha
=
nr_cyclic_shift_hopping
(
hoppingId
,
m0
,
mcs
,
l
,
startingSymbolIndex
,
nr_slot_tx
);
alpha
=
nr_cyclic_shift_hopping
(
hoppingId
,
m0
,
mcs
,
l
,
startingSymbolIndex
,
nr_slot_tx
);
//
#ifdef DEBUG_NR_PUCCH_TX
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch0] sequence generation
\t
u=%d
\t
v=%d
\t
alpha=%lf
\t
(for symbol l=%d)
\n
"
,
u
[
l
],
v
[
l
],
alpha
,
l
);
printf
(
"
\t
[nr_generate_pucch0] sequence generation
\t
u=%d
\t
v=%d
\t
alpha=%lf
\t
(for symbol l=%d)
\n
"
,
u
[
l
],
v
[
l
],
alpha
,
l
);
//
#endif
#endif
for
(
int
n
=
0
;
n
<
12
;
n
++
)
{
for
(
int
n
=
0
;
n
<
12
;
n
++
)
{
x_n_re
[
l
][
n
]
=
(
int16_t
)(((((
int32_t
)(
round
(
32767
*
cos
(
alpha
*
n
)))
*
table_5_2_2_2_2_Re
[
u
[
l
]][
n
])
>>
15
)
x_n_re
[
l
][
n
]
=
(
int16_t
)(((((
int32_t
)(
round
(
32767
*
cos
(
alpha
*
n
)))
*
table_5_2_2_2_2_Re
[
u
[
l
]][
n
])
>>
15
)
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
8b113b00
...
@@ -509,7 +509,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -509,7 +509,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
else
setup
=
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
rach_ConfigCommon
->
choice
.
setup
;
else
setup
=
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
rach_ConfigCommon
->
choice
.
setup
;
AssertFatal
(
&
setup
->
rach_ConfigGeneric
!=
NULL
,
"In %s: FATAL! rach_ConfigGeneric is NULL...
\n
"
,
__FUNCTION__
);
AssertFatal
(
&
setup
->
rach_ConfigGeneric
!=
NULL
,
"In %s: FATAL! rach_ConfigGeneric is NULL...
\n
"
,
__FUNCTION__
);
NR_RACH_ConfigGeneric_t
*
rach_ConfigGeneric
=
&
setup
->
rach_ConfigGeneric
;
NR_RACH_ConfigGeneric_t
*
rach_ConfigGeneric
=
&
setup
->
rach_ConfigGeneric
;
//NR_FrequencyInfoDL_t *frequencyInfoDL = scc->downlinkConfigCommon->frequencyInfoDL;
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
=
ra
->
rach_ConfigDedicated
;
NR_RACH_ConfigDedicated_t
*
rach_ConfigDedicated
=
ra
->
rach_ConfigDedicated
;
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
...
@@ -523,12 +522,12 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -523,12 +522,12 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
mac
->
common_configuration_complete
>
0
){
mac
->
common_configuration_complete
>
0
){
prach_resources
->
init_msg1
=
1
;
prach_resources
->
init_msg1
=
1
;
}
else
{
}
else
{
LOG_
I
(
PHY
,
"PRACH Condition not met: frame %d, prach_resources->sync_frame %d
\n
"
,
frame
,
prach_resources
->
sync_frame
);
LOG_
D
(
NR_MAC
,
"PRACH Condition not met: frame %d, prach_resources->sync_frame %d
\n
"
,
frame
,
prach_resources
->
sync_frame
);
return
0
;
return
0
;
}
}
}
}
LOG_
I
(
PHY
,
"frame %d prach_resources->init_msg1 %d, ra->ra_state %d, ra->RA_active %d
\n
"
,
LOG_
D
(
NR_MAC
,
"frame %d prach_resources->init_msg1 %d, ra->ra_state %d, ra->RA_active %d
\n
"
,
frame
,
prach_resources
->
init_msg1
,
ra
->
ra_state
,
ra
->
RA_active
);
frame
,
prach_resources
->
init_msg1
,
ra
->
ra_state
,
ra
->
RA_active
);
if
(
prach_resources
->
init_msg1
&&
ra
->
ra_state
!=
RA_SUCCEEDED
)
{
if
(
prach_resources
->
init_msg1
&&
ra
->
ra_state
!=
RA_SUCCEEDED
)
{
...
@@ -536,7 +535,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -536,7 +535,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
if
(
ra
->
RA_active
==
0
)
{
if
(
ra
->
RA_active
==
0
)
{
/* RA not active - checking if RRC is ready to initiate the RA procedure */
/* RA not active - checking if RRC is ready to initiate the RA procedure */
LOG_
I
(
MAC
,
"RA not active. Checking for data to transmit from upper layers...
\n
"
);
LOG_
D
(
NR_
MAC
,
"RA not active. Checking for data to transmit from upper layers...
\n
"
);
uint8_t
TBS_max
=
8
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
)
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
uint8_t
TBS_max
=
8
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
)
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
payload
=
(
uint8_t
*
)
mac
->
CCCH_pdu
.
payload
;
payload
=
(
uint8_t
*
)
mac
->
CCCH_pdu
.
payload
;
...
@@ -557,7 +556,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -557,7 +556,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
sdu_lengths
[
0
]
=
size_sdu
;
sdu_lengths
[
0
]
=
size_sdu
;
LOG_
I
(
MAC
,
"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes
\n
"
,
mod_id
,
frame
,
size_sdu
);
LOG_
D
(
NR_
MAC
,
"[UE %d] Frame %d: Requested RRCConnectionRequest, got %d bytes
\n
"
,
mod_id
,
frame
,
size_sdu
);
if
(
size_sdu
>
0
)
{
if
(
size_sdu
>
0
)
{
...
@@ -566,7 +565,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -566,7 +565,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Random Access Procedure has been successful after reception of Msg4
// Random Access Procedure has been successful after reception of Msg4
memcpy
(
ra
->
cont_res_id
,
mac_sdus
,
sizeof
(
uint8_t
)
*
6
);
memcpy
(
ra
->
cont_res_id
,
mac_sdus
,
sizeof
(
uint8_t
)
*
6
);
LOG_
I
(
MAC
,
"[UE %d][%d.%d]: starting initialisation Random Access Procedure...
\n
"
,
mod_id
,
frame
,
nr_slot_tx
);
LOG_
D
(
NR_
MAC
,
"[UE %d][%d.%d]: starting initialisation Random Access Procedure...
\n
"
,
mod_id
,
frame
,
nr_slot_tx
);
ra
->
Msg3_size
=
size_sdu
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
)
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
ra
->
Msg3_size
=
size_sdu
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
)
+
sizeof
(
NR_MAC_SUBHEADER_SHORT
);
...
@@ -630,6 +629,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -630,6 +629,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
}
else
{
}
else
{
ra
->
generate_nr_prach
=
GENERATE_IDLE
;
ra
->
generate_nr_prach
=
GENERATE_IDLE
;
}
}
}
else
if
(
ra
->
RA_window_cnt
==
0
&&
!
ra
->
RA_RAPID_found
)
{
}
else
if
(
ra
->
RA_window_cnt
==
0
&&
!
ra
->
RA_RAPID_found
)
{
LOG_I
(
MAC
,
"[UE %d][%d:%d] RAR reception failed
\n
"
,
mod_id
,
frame
,
nr_slot_tx
);
LOG_I
(
MAC
,
"[UE %d][%d:%d] RAR reception failed
\n
"
,
mod_id
,
frame
,
nr_slot_tx
);
...
@@ -642,9 +642,9 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -642,9 +642,9 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
// Fill in preamble and PRACH resources
// Fill in preamble and PRACH resources
ra
->
RA_window_cnt
--
;
ra
->
RA_window_cnt
--
;
if
(
ra
->
generate_nr_prach
==
GENERATE_PREAMBLE
)
{
if
(
ra
->
generate_nr_prach
==
GENERATE_PREAMBLE
)
{
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
nr_get_prach_resources
(
mod_id
,
CC_id
,
gNB_id
,
prach_resources
,
prach_pdu
,
rach_ConfigDedicated
);
}
}
}
else
if
(
ra
->
RA_backoff_cnt
>
0
)
{
}
else
if
(
ra
->
RA_backoff_cnt
>
0
)
{
LOG_D
(
MAC
,
"[UE %d][%d.%d]: RAR not received yet (RA backoff count %d)
\n
"
,
mod_id
,
frame
,
nr_slot_tx
,
ra
->
RA_backoff_cnt
);
LOG_D
(
MAC
,
"[UE %d][%d.%d]: RAR not received yet (RA backoff count %d)
\n
"
,
mod_id
,
frame
,
nr_slot_tx
,
ra
->
RA_backoff_cnt
);
...
@@ -663,7 +663,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -663,7 +663,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
nr_ue_contention_resolution
(
mod_id
,
CC_id
,
frame
,
nr_slot_tx
,
prach_resources
);
nr_ue_contention_resolution
(
mod_id
,
CC_id
,
frame
,
nr_slot_tx
,
prach_resources
);
}
}
LOG_
I
(
MAC
,
"ra->generate_nr_prach %d ra->ra_state %d (GENERATE_IDLE %d)
\n
"
,
ra
->
generate_nr_prach
,
ra
->
ra_state
,
GENERATE_IDLE
);
LOG_
D
(
MAC
,
"ra->generate_nr_prach %d ra->ra_state %d (GENERATE_IDLE %d)
\n
"
,
ra
->
generate_nr_prach
,
ra
->
ra_state
,
GENERATE_IDLE
);
if
(
ra
->
generate_nr_prach
!=
GENERATE_IDLE
)
{
if
(
ra
->
generate_nr_prach
!=
GENERATE_IDLE
)
{
return
ra
->
generate_nr_prach
;
return
ra
->
generate_nr_prach
;
}
else
{
}
else
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
8b113b00
...
@@ -358,7 +358,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
...
@@ -358,7 +358,7 @@ void nr_store_dlsch_buffer(module_id_t module_id,
0
,
0
,
0
);
0
);
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
;
LOG_
I
(
NR_MAC
,
LOG_
D
(
NR_MAC
,
"%d.%d, LCID%d:->DLSCH, RLC status %d bytes.
\n
"
,
"%d.%d, LCID%d:->DLSCH, RLC status %d bytes.
\n
"
,
frame
,
frame
,
slot
,
slot
,
...
@@ -787,7 +787,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -787,7 +787,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
harq
->
is_waiting
=
true
;
harq
->
is_waiting
=
true
;
UE_info
->
mac_stats
[
UE_id
].
dlsch_rounds
[
harq
->
round
]
++
;
UE_info
->
mac_stats
[
UE_id
].
dlsch_rounds
[
harq
->
round
]
++
;
LOG_
I
(
NR_MAC
,
LOG_
D
(
NR_MAC
,
"%4d.%2d RNTI %04x start %d RBs %d startSymbol %d nb_symbsol %d MCS %d TBS %d HARQ PID %d round %d NDI %d
\n
"
,
"%4d.%2d RNTI %04x start %d RBs %d startSymbol %d nb_symbsol %d MCS %d TBS %d HARQ PID %d round %d NDI %d
\n
"
,
frame
,
frame
,
slot
,
slot
,
...
@@ -816,7 +816,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -816,7 +816,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
dl_tti_pdcch_pdu
->
PDUSize
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_tti_pdcch_pdu
));
dl_tti_pdcch_pdu
->
PDUSize
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_tti_pdcch_pdu
));
dl_req
->
nPDUs
+=
1
;
dl_req
->
nPDUs
+=
1
;
pdcch_pdu
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
pdcch_pdu
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
LOG_
I
(
NR_MAC
,
"Trying to configure DL pdcch for bwp %d, cs %d
\n
"
,
bwpid
,
coresetid
);
LOG_
D
(
NR_MAC
,
"Trying to configure DL pdcch for bwp %d, cs %d
\n
"
,
bwpid
,
coresetid
);
NR_SearchSpace_t
*
ss
=
bwp
?
sched_ctrl
->
search_space
:
gNB_mac
->
sched_ctrlCommon
->
search_space
;
NR_SearchSpace_t
*
ss
=
bwp
?
sched_ctrl
->
search_space
:
gNB_mac
->
sched_ctrlCommon
->
search_space
;
NR_ControlResourceSet_t
*
coreset
=
bwp
?
sched_ctrl
->
coreset
:
gNB_mac
->
sched_ctrlCommon
->
coreset
;
NR_ControlResourceSet_t
*
coreset
=
bwp
?
sched_ctrl
->
coreset
:
gNB_mac
->
sched_ctrlCommon
->
coreset
;
nr_configure_pdcch
(
pdcch_pdu
,
ss
,
coreset
,
scc
,
bwp
);
nr_configure_pdcch
(
pdcch_pdu
,
ss
,
coreset
,
scc
,
bwp
);
...
@@ -957,7 +957,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -957,7 +957,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
dci_payload
.
pdsch_to_harq_feedback_timing_indicator
.
val
=
pucch
->
timing_indicator
;
// PDSCH to HARQ TI
dci_payload
.
pdsch_to_harq_feedback_timing_indicator
.
val
=
pucch
->
timing_indicator
;
// PDSCH to HARQ TI
dci_payload
.
antenna_ports
.
val
=
0
;
// nb of cdm groups w/o data 1 and dmrs port 0
dci_payload
.
antenna_ports
.
val
=
0
;
// nb of cdm groups w/o data 1 and dmrs port 0
dci_payload
.
dmrs_sequence_initialization
.
val
=
pdsch_pdu
->
SCID
;
dci_payload
.
dmrs_sequence_initialization
.
val
=
pdsch_pdu
->
SCID
;
LOG_
I
(
NR_MAC
,
LOG_
D
(
NR_MAC
,
"%4d.%2d DCI type 1 payload: freq_alloc %d (%d,%d,%d), "
"%4d.%2d DCI type 1 payload: freq_alloc %d (%d,%d,%d), "
"time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d ndi %d rv %d
\n
"
,
"time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d ndi %d rv %d
\n
"
,
frame
,
frame
,
...
@@ -986,7 +986,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -986,7 +986,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdsch_pdu
->
BWPSize
,
pdsch_pdu
->
BWPSize
,
bwp
?
bwp
->
bwp_Id
:
0
);
bwp
?
bwp
->
bwp_Id
:
0
);
LOG_
I
(
NR_MAC
,
LOG_
D
(
NR_MAC
,
"coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d
\n
"
,
"coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d
\n
"
,
(
unsigned
long
long
)
pdcch_pdu
->
FreqDomainResource
,
(
unsigned
long
long
)
pdcch_pdu
->
FreqDomainResource
,
pdcch_pdu
->
StartSymbolIndex
,
pdcch_pdu
->
StartSymbolIndex
,
...
@@ -1077,7 +1077,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -1077,7 +1077,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
0
,
0
,
0
);
0
);
LOG_
I
(
NR_MAC
,
LOG_
D
(
NR_MAC
,
"%4d.%2d RNTI %04x: %d bytes from DTCH %d (ndata %d, remaining size %d)
\n
"
,
"%4d.%2d RNTI %04x: %d bytes from DTCH %d (ndata %d, remaining size %d)
\n
"
,
frame
,
frame
,
slot
,
slot
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
8b113b00
...
@@ -1148,7 +1148,7 @@ bool nr_acknack_scheduling(int mod_id,
...
@@ -1148,7 +1148,7 @@ bool nr_acknack_scheduling(int mod_id,
}
}
}
}
LOG_
I
(
MAC
,
"1. DL slot %d, UL_ACK %d
\n
"
,
slot
,
pucch
->
ul_slot
);
LOG_
D
(
MAC
,
"1. DL slot %d, UL_ACK %d
\n
"
,
slot
,
pucch
->
ul_slot
);
/* if the UE's next PUCCH occasion is after the possible UL slots (within the
/* if the UE's next PUCCH occasion is after the possible UL slots (within the
* same frame) or wrapped around to the next frame, then we assume there is
* same frame) or wrapped around to the next frame, then we assume there is
* no possible PUCCH allocation anymore */
* no possible PUCCH allocation anymore */
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
8b113b00
...
@@ -733,7 +733,7 @@ void pf_ul(module_id_t module_id,
...
@@ -733,7 +733,7 @@ void pf_ul(module_id_t module_id,
/* Get previous PSUCH filed info */
/* Get previous PSUCH filed info */
sched_ctrl
->
sched_pusch
=
cur_harq
->
sched_pusch
;
sched_ctrl
->
sched_pusch
=
cur_harq
->
sched_pusch
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
LOG_
I
(
NR_MAC
,
"%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)
\n
"
,
LOG_
D
(
NR_MAC
,
"%4d.%2d Allocate UL retransmission UE %d/RNTI %04x sched %4d.%2d (%d RBs)
\n
"
,
frame
,
slot
,
UE_id
,
UE_info
->
rnti
[
UE_id
],
frame
,
slot
,
UE_id
,
UE_info
->
rnti
[
UE_id
],
sched_pusch
->
frame
,
sched_pusch
->
slot
,
sched_pusch
->
frame
,
sched_pusch
->
slot
,
sched_pusch
->
rbSize
);
sched_pusch
->
rbSize
);
...
@@ -1070,7 +1070,7 @@ void nr_schedule_ulsch(module_id_t module_id,
...
@@ -1070,7 +1070,7 @@ void nr_schedule_ulsch(module_id_t module_id,
cur_harq
->
sched_pusch
=
*
sched_pusch
;
cur_harq
->
sched_pusch
=
*
sched_pusch
;
sched_ctrl
->
sched_ul_bytes
+=
sched_pusch
->
tb_size
;
sched_ctrl
->
sched_ul_bytes
+=
sched_pusch
->
tb_size
;
}
else
{
}
else
{
LOG_
I
(
NR_MAC
,
LOG_
D
(
NR_MAC
,
"%d.%2d UL retransmission RNTI %04x sched %d.%2d HARQ PID %d round %d NDI %d
\n
"
,
"%d.%2d UL retransmission RNTI %04x sched %d.%2d HARQ PID %d round %d NDI %d
\n
"
,
frame
,
frame
,
slot
,
slot
,
...
...
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