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
1a16bdec
Commit
1a16bdec
authored
Mar 25, 2023
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LAstBe4BAbylonUpdate
parent
50fe7e08
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
18 deletions
+34
-18
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+4
-4
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+2
-2
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+11
-0
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+9
-4
No files found.
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
1a16bdec
...
...
@@ -39,7 +39,7 @@
//#define DEBUG_PDCCH_DMRS
#define DEBUG_DCI
#define DEBUG_CHANNEL_CODING
//
#define DEBUG_CHANNEL_CODING
void
nr_pdcch_scrambling
(
uint32_t
*
in
,
uint32_t
size
,
...
...
@@ -50,7 +50,7 @@ void nr_pdcch_scrambling(uint32_t *in,
uint32_t
x1
,
x2
,
s
=
0
;
reset
=
1
;
x2
=
(
scrambling_RNTI
<<
16
)
+
Nid
;
LOG_
I
(
PHY
,
"PDCCH Scrambling x2 %x : scrambling_RNTI %x
\n
"
,
x2
,
scrambling_RNTI
);
LOG_
D
(
PHY
,
"PDCCH Scrambling x2 %x : scrambling_RNTI %x
\n
"
,
x2
,
scrambling_RNTI
);
for
(
int
i
=
0
;
i
<
size
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
...
...
@@ -106,8 +106,8 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
cset_start_symb
=
pdcch_pdu_rel15
->
StartSymbolIndex
;
cset_nsymb
=
pdcch_pdu_rel15
->
DurationSymbols
;
dci_idx
=
0
;
LOG_
I
(
PHY
,
"pdcch: Coreset rb_offset %d, nb_rb %d BWP Start %d
\n
"
,
rb_offset
,
n_rb
,
pdcch_pdu_rel15
->
BWPStart
);
LOG_
I
(
PHY
,
"pdcch: Coreset starting subcarrier %d on symbol %d (%d symbols)
\n
"
,
cset_start_sc
,
cset_start_symb
,
cset_nsymb
);
LOG_
D
(
PHY
,
"pdcch: Coreset rb_offset %d, nb_rb %d BWP Start %d
\n
"
,
rb_offset
,
n_rb
,
pdcch_pdu_rel15
->
BWPStart
);
LOG_
D
(
PHY
,
"pdcch: Coreset starting subcarrier %d on symbol %d (%d symbols)
\n
"
,
cset_start_sc
,
cset_start_symb
,
cset_nsymb
);
// DMRS length is per OFDM symbol
uint32_t
dmrs_length
=
n_rb
*
6
;
//2(QPSK)*3(per RB)*6(REG per CCE)
uint32_t
encoded_length
=
dci_pdu
->
AggregationLevel
*
108
;
//2(QPSK)*9(per RB)*6(REG per CCE)
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
1a16bdec
...
...
@@ -195,7 +195,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
gNB
->
ulsch
[
rdata
->
ulsch_id
]
->
harq_processes
[
rdata
->
harq_pid
]
->
ulsch_pdu
;
bool
decodeSuccess
=
(
rdata
->
decodeIterations
<=
rdata
->
decoderParms
.
numMaxIter
);
ulsch_harq
->
processedSegments
++
;
LOG_
I
(
PHY
,
"processing result of segment: %d, processed %d/%d
\n
"
,
LOG_
D
(
PHY
,
"processing result of segment: %d, processed %d/%d
\n
"
,
rdata
->
segment_r
,
ulsch_harq
->
processedSegments
,
rdata
->
nbSegments
);
gNB
->
nbDecode
--
;
LOG_I
(
PHY
,
"remain to decoded in subframe: %d
\n
"
,
gNB
->
nbDecode
);
...
...
@@ -234,7 +234,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
LOG_I
(
PHY
,
"ULSCH received ok
\n
"
);
// counterFlag+=1;
LOG_I
(
PHY
,
"counterFlag ok %d
\n
"
,
counterFlag
);
//
LOG_I(PHY, "counterFlag ok %d\n",counterFlag);
nr_fill_indication
(
gNB
,
ulsch_harq
->
frame
,
ulsch_harq
->
slot
,
rdata
->
ulsch_id
,
rdata
->
harq_pid
,
0
,
0
);
dumpsig
=
1
;
...
...
@@ -250,7 +250,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
r
);
Setting_NACkK
=
1
;
counterFlag
+=
1
;
LOG_I
(
PHY
,
"counterFlag ok %d
\n
"
,
counterFlag
);
//
LOG_I(PHY, "counterFlag ok %d\n",counterFlag);
ulsch_harq
->
handled
=
1
;
LOG_I
(
PHY
,
"ULSCH %d in error
\n
"
,
rdata
->
ulsch_id
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
1a16bdec
...
...
@@ -980,7 +980,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
=
gNB_mac
->
pdcch_pdu_idx
[
CC_id
][
coresetid
];
if
(
!
pdcch_pdu
)
{
LOG_
I
(
NR_MAC
,
"creating pdcch pdu, pdcch_pdu = NULL.
\n
"
);
LOG_
D
(
NR_MAC
,
"creating pdcch pdu, pdcch_pdu = NULL.
\n
"
);
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdcch_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
memset
(
dl_tti_pdcch_pdu
,
0
,
sizeof
(
nfapi_nr_dl_tti_request_pdu_t
));
dl_tti_pdcch_pdu
->
PDUType
=
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
1a16bdec
...
...
@@ -988,7 +988,7 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
for
(
int
i
=
0
;
i
<
6
;
i
++
)
{
pdcch_pdu
->
FreqDomainResource
[
i
]
=
coreset
->
frequencyDomainResources
.
buf
[
i
];
if
(
coreset
->
frequencyDomainResources
.
buf
[
i
]
!=
0x00
)
LOG_
I
(
MAC
,
"Coreset : BWPstart %d, BWPsize %d, SCS %d, freq %x, , duration %d
\n
"
,
LOG_
D
(
MAC
,
"Coreset : BWPstart %d, BWPsize %d, SCS %d, freq %x, , duration %d
\n
"
,
pdcch_pdu
->
BWPStart
,
pdcch_pdu
->
BWPSize
,(
int
)
pdcch_pdu
->
SubcarrierSpacing
,(
int
)
coreset
->
frequencyDomainResources
.
buf
[
i
],(
int
)
coreset
->
duration
);
}
pdcch_pdu
->
CceRegMappingType
=
pdcch
->
CceRegMappingType
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
1a16bdec
...
...
@@ -942,7 +942,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
if
(
uci_01
->
sr
->
sr_indication
&&
uci_01
->
sr
->
sr_confidence_level
==
0
&&
uci_01
->
ul_cqi
>=
148
)
{
// SR detected with SNR >= 10dB
sched_ctrl
->
SR
|=
true
;
LOG_
D
(
NR_MAC
,
"SR UE %04x ul_cqi %d
\n
"
,
uci_01
->
rnti
,
uci_01
->
ul_cqi
);
LOG_
I
(
NR_MAC
,
"SR UE %04x ul_cqi %d
\n
"
,
uci_01
->
rnti
,
uci_01
->
ul_cqi
);
}
free
(
uci_01
->
sr
);
}
...
...
@@ -1353,10 +1353,10 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
find_period_offest_SR
(
SchedulingRequestResourceConfig
,
&
SR_period
,
&
SR_offset
);
// convert to int to avoid underflow of uint
int
sfn_sf
=
SFN
*
n_slots_frame
+
slot
;
LOG_
D
(
NR_MAC
,
"SR_resource_id %d: SR_period %d, SR_offset %d
\n
"
,
SR_resource_id
,
SR_period
,
SR_offset
);
LOG_
I
(
NR_MAC
,
"SR_resource_id %d: SR_period %d, SR_offset %d
\n
"
,
SR_resource_id
,
SR_period
,
SR_offset
);
if
((
sfn_sf
-
SR_offset
)
%
SR_period
!=
0
)
continue
;
LOG_
D
(
NR_MAC
,
"%4d.%2d Scheduling Request identified
\n
"
,
SFN
,
slot
);
LOG_
I
(
NR_MAC
,
"%4d.%2d Scheduling Request identified
\n
"
,
SFN
,
slot
);
NR_PUCCH_ResourceId_t
*
PucchResourceId
=
SchedulingRequestResourceConfig
->
resource
;
int
found
=
-
1
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
1a16bdec
...
...
@@ -534,7 +534,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
gNB_MAC_INST
*
gNB_mac
=
RC
.
nrmac
[
gnb_mod_idP
];
const
int
current_rnti
=
rntiP
;
LOG_
I
(
NR_MAC
,
"rx_sdu for rnti %04x
\n
"
,
current_rnti
);
LOG_
D
(
NR_MAC
,
"rx_sdu for rnti %04x
\n
"
,
current_rnti
);
const
int
target_snrx10
=
gNB_mac
->
pusch_target_snrx10
;
const
int
pusch_failure_thres
=
gNB_mac
->
pusch_failure_thres
;
...
...
@@ -890,7 +890,7 @@ static bool nr_UE_is_to_be_scheduled(const NR_ServingCellConfigCommon_t *scc,
* (3) or we did not schedule it in more than 10 frames */
const
bool
has_data
=
sched_ctrl
->
estimated_ul_buffer
>
sched_ctrl
->
sched_ul_bytes
;
const
bool
high_inactivity
=
diff
>=
(
ulsch_max_frame_inactivity
>
0
?
ulsch_max_frame_inactivity
*
n
:
num_slots_per_period
);
LOG_
D
(
NR_MAC
,
LOG_
I
(
NR_MAC
,
"%4d.%2d UL inactivity %d slots has_data %d SR %d
\n
"
,
frame
,
slot
,
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
1a16bdec
...
...
@@ -750,8 +750,18 @@ static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedul
if
(
tdd
)
sr_slot
=
tdd
->
nrofDownlinkSlots
;
// SR in the first uplink slot
LOG_I
(
NR_RRC
,
"sr_slot (%d)
\n
"
,
sr_slot
);
LOG_I
(
NR_RRC
,
"SCS (%ld)
\n
"
,
*
scc
->
ssbSubcarrierSpacing
);
schedulingRequestResourceConfig
->
periodicityAndOffset
=
calloc
(
1
,
sizeof
(
*
schedulingRequestResourceConfig
->
periodicityAndOffset
));
if
(
*
scc
->
ssbSubcarrierSpacing
==
3
){
// just a hack for FR2, the whole function should be implemented better;
schedulingRequestResourceConfig
->
periodicityAndOffset
->
present
=
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl40
;
schedulingRequestResourceConfig
->
periodicityAndOffset
->
choice
.
sl640
=
sr_slot
;
return
;
}
if
(
sr_slot
<
10
){
schedulingRequestResourceConfig
->
periodicityAndOffset
->
present
=
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10
;
schedulingRequestResourceConfig
->
periodicityAndOffset
->
choice
.
sl10
=
sr_slot
;
...
...
@@ -782,6 +792,7 @@ static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedul
schedulingRequestResourceConfig
->
periodicityAndOffset
->
choice
.
sl320
=
sr_slot
;
return
;
}
schedulingRequestResourceConfig
->
periodicityAndOffset
->
present
=
NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl640
;
schedulingRequestResourceConfig
->
periodicityAndOffset
->
choice
.
sl640
=
sr_slot
;
}
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
1a16bdec
...
...
@@ -118,9 +118,14 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
rlc_BearerToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
rlc_BearerToAddModList
));
ASN_SEQUENCE_ADD
(
&
secondaryCellGroup
->
rlc_BearerToAddModList
->
list
,
RLC_BearerConfig
);
NR_MAC_CellGroupConfig_t
*
mac_CellGroupConfig
=
secondaryCellGroup
->
mac_CellGroupConfig
;
// NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = secondaryCellGroup->mac_CellGroupConfig;
// mac_CellGroupConfig=calloc(1,sizeof(*mac_CellGroupConfig));
NR_MAC_CellGroupConfig_t
*
mac_CellGroupConfig
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
));
secondaryCellGroup
->
mac_CellGroupConfig
=
mac_CellGroupConfig
;
mac_CellGroupConfig
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
));
mac_CellGroupConfig
->
drx_Config
=
NULL
;
mac_CellGroupConfig
->
bsr_Config
=
calloc
(
1
,
sizeof
(
*
mac_CellGroupConfig
->
bsr_Config
));
...
...
@@ -139,8 +144,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
physicalCellGroupConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
physicalCellGroupConfig
));
secondaryCellGroup
->
physicalCellGroupConfig
->
harq_ACK_SpatialBundlingPUCCH
=
NULL
;
secondaryCellGroup
->
physicalCellGroupConfig
->
harq_ACK_SpatialBundlingPUSCH
=
NULL
;
//secondaryCellGroup->physicalCellGroupConfig->p_NR_FR1=calloc(1,sizeof(*secondaryCellGroup->physicalCellGroupConfig->p_NR_FR1));
//*secondaryCellGroup->physicalCellGroupConfig->p_NR_FR1=20
;
//secondaryCellGroup->physicalCellGroupConfig->p_NR_FR1=calloc(1,sizeof(*secondaryCellGroup->physicalCellGroupConfig->p_NR_FR1));
secondaryCellGroup
->
physicalCellGroupConfig
->
p_NR_FR1
=
NULL
;
secondaryCellGroup
->
physicalCellGroupConfig
->
pdsch_HARQ_ACK_Codebook
=
NR_PhysicalCellGroupConfig__pdsch_HARQ_ACK_Codebook_dynamic
;
secondaryCellGroup
->
physicalCellGroupConfig
->
tpc_SRS_RNTI
=
NULL
;
secondaryCellGroup
->
physicalCellGroupConfig
->
tpc_PUCCH_RNTI
=
NULL
;
...
...
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