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
ZhouShuya
OpenXG-RAN
Commits
7e1592fd
Commit
7e1592fd
authored
Apr 17, 2021
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary differences
parent
6f186c2f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
37 deletions
+29
-37
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+3
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+9
-8
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+17
-17
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+0
-8
No files found.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
7e1592fd
...
...
@@ -796,12 +796,11 @@ int main(int argc, char **argv)
n_rx
,
channel_model
,
fs
/
1e6
,
//sampling frequency in MHz
bw
,
30e-9
,
bw
,
30e-9
,
0
,
0
,
0
,
0
);
0
,
0
);
if
(
gNB2UE
==
NULL
)
{
printf
(
"Problem generating channel model. Exiting.
\n
"
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
7e1592fd
...
...
@@ -1203,22 +1203,23 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
uint16_t
N_DMRS_SLOT
=
get_num_dmrs
(
dlDmrsSymbPos
);
long
dmrsConfigType
=
bwp
!=
NULL
?
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
)
:
0
;
uint8_t
N_PRB_DMRS
=
0
;
uint8_t
numDmrsCdmGrpsNoData
=
2
;
nr_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
=
2
;
if
(
nrOfSymbols
==
2
)
{
numDmrsCdmGrpsNoData
=
1
;
n
r_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
n
umDmrsCdmGrpsNoData
=
1
;
}
AssertFatal
(
numDmrsCdmGrpsNoData
==
1
||
numDmrsCdmGrpsNoData
==
2
,
"nr_mac->schedCtrlCommon->numDmrsCdmGrpsNoData %d is not possible"
,
numDmrsCdmGrpsNoData
);
AssertFatal
(
nr_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
==
1
||
nr_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
==
2
,
"nr_mac->schedCtrlCommon->pdsch_semi_static.numDmrsCdmGrpsNoData %d is not possible"
,
nr_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
);
uint8_t
N_PRB_DMRS
=
0
;
if
(
dmrsConfigType
==
NFAPI_NR_DMRS_TYPE1
)
{
N_PRB_DMRS
=
numDmrsCdmGrpsNoData
*
6
;
N_PRB_DMRS
=
n
r_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
n
umDmrsCdmGrpsNoData
*
6
;
}
else
{
N_PRB_DMRS
=
numDmrsCdmGrpsNoData
*
4
;
N_PRB_DMRS
=
n
r_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
n
umDmrsCdmGrpsNoData
*
4
;
}
uint8_t
mcsTableIdx
=
0
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
7e1592fd
...
...
@@ -172,13 +172,13 @@ void calculate_preferred_ul_tda(module_id_t module_id, const NR_BWP_Uplink_t *ub
tdd
->
nrofUplinkSlots
);
}
void
nr_process_mac_pdu
(
module_id_t
module_idP
,
rnti_t
rnti
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
*
pduP
,
uint16_t
mac_pdu_len
)
void
nr_process_mac_pdu
(
module_id_t
module_idP
,
int
UE_id
,
uint8_t
CC_id
,
frame_t
frameP
,
sub_frame_t
slot
,
uint8_t
*
pduP
,
uint16_t
mac_pdu_len
)
{
// This function is adapting code from the old
...
...
@@ -190,11 +190,6 @@ void nr_process_mac_pdu(
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_idP
]
->
UE_info
;
int
UE_id
=
find_nr_UE_id
(
module_idP
,
rnti
);
if
(
UE_id
==
-
1
)
{
LOG_E
(
MAC
,
"%s() UE_id == -1
\n
"
,
__func__
);
return
;
}
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
// For both DL/UL-SCH
// Except:
...
...
@@ -256,7 +251,10 @@ void nr_process_mac_pdu(
NR_BSR_SHORT
*
bsr_s
=
(
NR_BSR_SHORT
*
)
ce_ptr
;
sched_ctrl
->
estimated_ul_buffer
=
0
;
sched_ctrl
->
estimated_ul_buffer
=
NR_SHORT_BSR_TABLE
[
bsr_s
->
Buffer_size
];
LOG_D
(
MAC
,
"SHORT BSR, LCG ID %d, BS Index %d, BS value < %d, est buf %d
\n
"
,
LOG_D
(
MAC
,
"SHORT BSR at %4d.%2d, LCG ID %d, BS Index %d, BS value < %d, est buf %d
\n
"
,
frameP
,
slot
,
bsr_s
->
LcgID
,
bsr_s
->
Buffer_size
,
NR_SHORT_BSR_TABLE
[
bsr_s
->
Buffer_size
],
...
...
@@ -285,7 +283,9 @@ void nr_process_mac_pdu(
sched_ctrl
->
estimated_ul_buffer
+=
NR_LONG_BSR_TABLE
[
pdu_ptr
[
mac_subheader_len
+
1
+
n
]];
LOG_D
(
MAC
,
"LONG BSR, %d/%d (n/n_Lcg), BS Index %d, BS value < %d, total %d
\n
"
,
"LONG BSR at %4d.%2d, %d/%d (n/n_Lcg), BS Index %d, BS value < %d, total %d
\n
"
,
frameP
,
slot
,
n
,
n_Lcg
,
pdu_ptr
[
mac_subheader_len
+
1
+
n
],
...
...
@@ -394,7 +394,7 @@ void nr_process_mac_pdu(
frameP
,
0
,
0
,
rnti
,
UE_info
->
rnti
[
UE_id
]
,
CCCH
,
pdu_ptr
+
mac_subheader_len
,
mac_sdu_len
,
...
...
@@ -618,7 +618,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
if
(
UE_scheduling_control
->
sched_ul_bytes
<
0
)
UE_scheduling_control
->
sched_ul_bytes
=
0
;
nr_process_mac_pdu
(
gnb_mod_idP
,
current_rnti
,
CC_idP
,
frame
P
,
sduP
,
sdu_lenP
);
nr_process_mac_pdu
(
gnb_mod_idP
,
UE_id
,
CC_idP
,
frameP
,
slot
P
,
sduP
,
sdu_lenP
);
}
}
else
if
(
sduP
)
{
...
...
@@ -707,7 +707,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
// First byte corresponds to R/LCID MAC sub-header
memcpy
(
ra
->
cont_res_id
,
&
sduP
[
1
],
sizeof
(
uint8_t
)
*
6
);
nr_process_mac_pdu
(
gnb_mod_idP
,
current_rnti
,
CC_idP
,
frame
P
,
sduP
,
sdu_lenP
);
nr_process_mac_pdu
(
gnb_mod_idP
,
UE_id
,
CC_idP
,
frameP
,
slot
P
,
sduP
,
sdu_lenP
);
ra
->
state
=
Msg4
;
ra
->
Msg4_frame
=
(
frameP
+
2
)
%
1024
;
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
7e1592fd
...
...
@@ -359,14 +359,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
void
nr_check_Msg4_Ack
(
module_id_t
module_id
,
int
CC_id
,
frame_t
frame
,
sub_frame_t
slot
,
NR_RA_t
*
ra
);
void
nr_process_mac_pdu
(
module_id_t
module_idP
,
rnti_t
rnti
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
*
pduP
,
uint16_t
mac_pdu_len
);
int
binomial
(
int
n
,
int
k
);
bool
is_xlsch_in_slot
(
uint64_t
bitmap
,
sub_frame_t
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