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
canghaiwuhen
OpenXG-RAN
Commits
8533610e
Commit
8533610e
authored
May 22, 2020
by
vr.devendra
Committed by
k.ramya
Jun 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GlobalEdge: CSI and TCI related MAC CE intial commit
parent
3bce9a7b
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
706 additions
and
317 deletions
+706
-317
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+114
-54
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+291
-110
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+300
-153
No files found.
cmake_targets/CMakeLists.txt
View file @
8533610e
...
...
@@ -249,6 +249,7 @@ add_boolean_option(UE_AUTOTEST_TRACE False "Activate UE autotest specific logs
add_boolean_option
(
UE_DEBUG_TRACE False
"Activate UE debug trace"
)
add_boolean_option
(
UE_TIMING_TRACE False
"Activate UE timing trace"
)
add_boolean_option
(
DEBUG_CONSOLE False
"makes debugging easier, disables stdout/stderr buffering"
)
add_boolean_option
(
GES_SUPPORT True
"To enable the GES Code"
)
set
(
OCP_ITTI
${
OPENAIR_DIR
}
/common/utils/ocp_itti
)
add_library
(
ITTI
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
View file @
8533610e
...
...
@@ -71,72 +71,132 @@
// R: Reserved bit, set to zero.
typedef
struct
{
uint8_t
LCID
:
6
;
// octet 1 [5:0]
uint8_t
F
:
1
;
// octet 1 [6]
uint8_t
R
:
1
;
// octet 1 [7]
uint8_t
L
:
8
;
// octet 2 [7:0]
uint8_t
LCID
:
6
;
// octet 1 [5:0]
uint8_t
F
:
1
;
// octet 1 [6]
uint8_t
R
:
1
;
// octet 1 [7]
uint8_t
L
:
8
;
// octet 2 [7:0]
}
__attribute__
((
__packed__
))
NR_MAC_SUBHEADER_SHORT
;
typedef
struct
{
uint8_t
LCID
:
6
;
// octet 1 [5:0]
uint8_t
F
:
1
;
// octet 1 [6]
uint8_t
R
:
1
;
// octet 1 [7]
uint8_t
L1
:
8
;
// octet 2 [7:0]
uint8_t
L2
:
8
;
// octet 3 [7:0]
uint8_t
LCID
:
6
;
// octet 1 [5:0]
uint8_t
F
:
1
;
// octet 1 [6]
uint8_t
R
:
1
;
// octet 1 [7]
uint8_t
L1
:
8
;
// octet 2 [7:0]
uint8_t
L2
:
8
;
// octet 3 [7:0]
}
__attribute__
((
__packed__
))
NR_MAC_SUBHEADER_LONG
;
typedef
struct
{
uint8_t
LCID
:
6
;
// octet 1 [5:0]
uint8_t
R
:
2
;
// octet 1 [7:6]
uint8_t
LCID
:
6
;
// octet 1 [5:0]
uint8_t
R
:
2
;
// octet 1 [7:6]
}
__attribute__
((
__packed__
))
NR_MAC_SUBHEADER_FIXED
;
// BSR MAC CEs
// TS 38.321 ch. 6.1.3.1
// Short BSR for a specific logical channel group ID
typedef
struct
{
uint8_t
Buffer_size
:
5
;
// octet 1 LSB
uint8_t
LcgID
:
3
;
// octet 1 MSB
uint8_t
Buffer_size
:
5
;
// octet 1 LSB
uint8_t
LcgID
:
3
;
// octet 1 MSB
}
__attribute__
((
__packed__
))
NR_BSR_SHORT
;
typedef
NR_BSR_SHORT
NR_BSR_SHORT_TRUNCATED
;
// Long BSR for all logical channel group ID
typedef
struct
{
uint8_t
Buffer_size7
:
8
;
uint8_t
Buffer_size6
:
8
;
uint8_t
Buffer_size5
:
8
;
uint8_t
Buffer_size4
:
8
;
uint8_t
Buffer_size3
:
8
;
uint8_t
Buffer_size2
:
8
;
uint8_t
Buffer_size1
:
8
;
uint8_t
Buffer_size0
:
8
;
uint8_t
LcgID0
:
1
;
uint8_t
LcgID1
:
1
;
uint8_t
LcgID2
:
1
;
uint8_t
LcgID3
:
1
;
uint8_t
LcgID4
:
1
;
uint8_t
LcgID5
:
1
;
uint8_t
LcgID6
:
1
;
uint8_t
LcgID7
:
1
;
uint8_t
Buffer_size7
:
8
;
uint8_t
Buffer_size6
:
8
;
uint8_t
Buffer_size5
:
8
;
uint8_t
Buffer_size4
:
8
;
uint8_t
Buffer_size3
:
8
;
uint8_t
Buffer_size2
:
8
;
uint8_t
Buffer_size1
:
8
;
uint8_t
Buffer_size0
:
8
;
uint8_t
LcgID0
:
1
;
uint8_t
LcgID1
:
1
;
uint8_t
LcgID2
:
1
;
uint8_t
LcgID3
:
1
;
uint8_t
LcgID4
:
1
;
uint8_t
LcgID5
:
1
;
uint8_t
LcgID6
:
1
;
uint8_t
LcgID7
:
1
;
}
__attribute__
((
__packed__
))
NR_BSR_LONG
;
typedef
NR_BSR_LONG
NR_BSR_LONG_TRUNCATED
;
// 38.321 ch. 6.1.3.4
typedef
struct
{
uint8_t
TA_COMMAND
:
6
;
// octet 1 [5:0]
uint8_t
TAGID
:
2
;
// octet 1 [7:6]
uint8_t
TA_COMMAND
:
6
;
// octet 1 [5:0]
uint8_t
TAGID
:
2
;
// octet 1 [7:6]
}
__attribute__
((
__packed__
))
NR_MAC_CE_TA
;
// single Entry PHR MAC CE
// TS 38.321 ch. 6.1.3.8
typedef
struct
{
uint8_t
PH
:
6
;
uint8_t
R1
:
2
;
uint8_t
PCMAX
:
6
;
uint8_t
R2
:
6
;
uint8_t
PH
:
6
;
uint8_t
R1
:
2
;
uint8_t
PCMAX
:
6
;
uint8_t
R2
:
6
;
}
__attribute__
((
__packed__
))
NR_SINGLE_ENTRY_PHR_MAC_CE
;
#ifdef GES_SUPPORT
// SP ZP CSI-RS Resource Set Activation/Deactivation MAC CE
// 38.321 ch. 6.1.3.19
typedef
struct
{
uint8_t
BWPID
:
2
;
// octet 1 [1:0]
uint8_t
CELLID
:
5
;
// octet 1 [6:2]
uint8_t
A_D
:
1
;
// octet 1 [7]
uint8_t
CSIRS_RSC_ID
:
4
;
// octet 2 [3:0]
uint8_t
R
:
4
// octet 2 [7:4]
}
__attribute__
((
__packed__
))
NR_MAC_CE_SP_ZP_CSI_RS_RES_SET
;
//TS 38.321 Sec 6.1.3.15, TCI State indicaton for UE-Specific PDCCH MAC CE
typedef
struct
{
uint8_t
CoresetId1
:
3
;
//Octect 1 [2:0]
uint8_t
ServingCellId
:
5
;
//Octect 1 [7:3]
uint8_t
TciStateId
:
7
;
//Octect 2 [6:0]
uint8_t
CoresetId2
:
1
;
//Octect 2 [7]
}
__attribute__
((
__packed__
))
NR_TCI_PDCCH
;
//TS 38.321 Sec 6.1.3.14, TCI State activation/deactivation for UE Specific PDSCH MAC CE
typedef
struct
{
uint8_t
BWP_Id
:
2
;
//Octect 1 [1:0]
uint8_t
ServingCellId
:
5
;
//Octect 1 [6:2]
uint8_t
R
:
1
;
//Octect 1 [7]
uint8_t
T
[];
//Octects 2 to MAX TCI States/8
}
__attribute__
((
__packed__
))
NR_TCI_PDSCH_APERIODIC_CSI
;
//TS 6.1.3.16, SP CSI reporting on PUCCH Activation/Deactivation MAC CE
typedef
struct
{
uint8_t
BWP_Id
:
2
;
//Octect 1 [1:0]
uint8_t
ServingCellId
:
5
;
//Octect 1 [6:2]
uint8_t
R1
:
1
;
//Octect 1 [7]
uint8_t
S0
:
1
;
//Octect 2 [0]
uint8_t
S1
:
1
;
//Octect 2 [1]
uint8_t
S2
:
1
;
//Octect 2 [2]
uint8_t
S3
:
1
;
//Octect 2 [3]
uint8_t
R2
:
4
;
//Octect 2 [7:4]
}
__attribute__
((
__packed__
))
NR_PUCCH_CSI_REPORTING
;
//TS 38.321 sec 6.1.3.12
//SP CSI-RS / CSI-IM Resource Set Activation/Deactivation MAC CE
typedef
struct
{
uint8_t
BWP_ID
:
2
;
uint8_t
SCID
:
5
;
uint8_t
A_D
:
1
;
uint8_t
SP_CSI_RSID
:
6
;
uint8_t
IM
:
1
;
uint8_t
R1
:
1
;
uint8_t
SP_CSI_IMID
:
6
;
uint8_t
R2
:
2
;
struct
TCI_S
{
uint8_t
TCI_STATE_ID
:
6
;
uint8_t
R
:
2
;
}
__attribute__
((
__packed__
))
TCI_STATE
;
}
__attribute__
((
__packed__
))
CSI_RS_CSI_IM_ACT_DEACT_MAC_CE
;
#endif
//* RAR MAC subheader // TS 38.321 ch. 6.1.5, 6.2.2 *//
// - E: The Extension field is a flag indicating if the MAC subPDU including this MAC subheader is the last MAC subPDU or not in the MAC PDU
// - T: The Type field is a flag indicating whether the MAC subheader contains a Random Access Preamble ID or a Backoff Indicator (0, BI) (1, RAPID)
...
...
@@ -146,30 +206,30 @@ typedef struct {
/*!\brief RAR MAC subheader with RAPID */
typedef
struct
{
uint8_t
RAPID
:
6
;
uint8_t
T
:
1
;
uint8_t
E
:
1
;
uint8_t
RAPID
:
6
;
uint8_t
T
:
1
;
uint8_t
E
:
1
;
}
__attribute__
((
__packed__
))
NR_RA_HEADER_RAPID
;
/*!\brief RAR MAC subheader with Backoff Indicator */
typedef
struct
{
uint8_t
BI
:
4
;
uint8_t
R
:
2
;
uint8_t
T
:
1
;
uint8_t
E
:
1
;
uint8_t
BI
:
4
;
uint8_t
R
:
2
;
uint8_t
T
:
1
;
uint8_t
E
:
1
;
}
__attribute__
((
__packed__
))
NR_RA_HEADER_BI
;
// TS 38.321 ch. 6.2.3
typedef
struct
{
uint8_t
TA1
:
7
;
// octet 1 [6:0]
uint8_t
R
:
1
;
// octet 1 [7]
uint8_t
UL_GRANT_1
:
3
;
// octet 2 [2:0]
uint8_t
TA2
:
5
;
// octet 2 [7:3]
uint8_t
UL_GRANT_2
:
8
;
// octet 3 [7:0]
uint8_t
UL_GRANT_3
:
8
;
// octet 4 [7:0]
uint8_t
UL_GRANT_4
:
8
;
// octet 5 [7:0]
uint8_t
TCRNTI_1
:
8
;
// octet 6 [7:0]
uint8_t
TCRNTI_2
:
8
;
// octet 7 [7:0]
uint8_t
TA1
:
7
;
// octet 1 [6:0]
uint8_t
R
:
1
;
// octet 1 [7]
uint8_t
UL_GRANT_1
:
3
;
// octet 2 [2:0]
uint8_t
TA2
:
5
;
// octet 2 [7:3]
uint8_t
UL_GRANT_2
:
8
;
// octet 3 [7:0]
uint8_t
UL_GRANT_3
:
8
;
// octet 4 [7:0]
uint8_t
UL_GRANT_4
:
8
;
// octet 5 [7:0]
uint8_t
TCRNTI_1
:
8
;
// octet 6 [7:0]
uint8_t
TCRNTI_2
:
8
;
// octet 7 [7:0]
}
__attribute__
((
__packed__
))
NR_MAC_RAR
;
// 38.321 ch6.2.1, 38.331
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
8533610e
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
8533610e
...
...
@@ -179,6 +179,74 @@ typedef struct {
uint8_t
num_sf_allocation_pattern
;
}
NR_COMMON_channels_t
;
#ifdef GES_SUPPORT
// SP ZP CSI-RS Resource Set Activation/Deactivation MAC CE
typedef
struct
sp_zp_csirs
{
bool
is_scheduled
;
//ZP CSI-RS ACT/Deact MAC CE is scheduled
bool
act_deact
;
//Activation/Deactivation indication
uint8_t
serv_cell_id
;
//Identity of Serving cell for which MAC CE applies
uint8_t
bwpid
;
//Downlink BWP id
uint8_t
rsc_id
;
//SP ZP CSI-RS resource set
}
sp_zp_csirs_t
;
//SP CSI-RS / CSI-IM Resource Set Activation/Deactivation MAC CE
#define MAX_CSI_RESOURCE_SET 64
typedef
struct
csi_rs_im
{
bool
is_scheduled
;
bool
act_deact
;
uint8_t
serv_cellid
;
uint8_t
bwp_id
;
bool
im
;
uint8_t
csi_im_rsc_id
;
uint8_t
nzp_csi_rsc_id
;
uint8_t
nb_tci_resource_set_id
;
uint8_t
tci_state_id
[
MAX_CSI_RESOURCE_SET
];
}
csi_rs_im_t
;
typedef
struct
pdcchStateInd
{
bool
is_scheduled
;
uint8_t
servingCellId
;
uint8_t
coresetId
;
uint8_t
tciStateId
;
}
pdcchStateInd_t
;
typedef
struct
SPCSIReportingpucch
{
bool
is_scheduled
;
uint8_t
servingCellId
;
uint8_t
bwpId
;
bool
s0tos3_actDeact
[
4
];
}
SPCSIReportingpucch_t
;
#define MAX_APERIODIC_TRIGGER_STATES 128 //38.331
typedef
struct
aperiodicCSI_triggerStateSelection
{
bool
is_scheduled
;
uint8_t
servingCellId
;
uint8_t
bwpId
;
uint8_t
highestTriggerStateSelected
;
bool
triggerStateSelection
[
MAX_APERIODIC_TRIGGER_STATES
];
}
aperiodicCSI_triggerStateSelection_t
;
#define MAX_TCI_STATES 128 //38.331
typedef
struct
pdschTciStatesActDeact
{
bool
is_scheduled
;
uint8_t
servingCellId
;
uint8_t
bwpId
;
uint8_t
highestTciStateActivated
;
bool
tciStateActDeact
[
MAX_TCI_STATES
];
}
pdschTciStatesActDeact_t
;
typedef
struct
UE_info
{
sp_zp_csirs_t
sp_zp_csi_rs
;
csi_rs_im_t
csi_im
;
pdcchStateInd_t
pdcch_state_ind
;
SPCSIReportingpucch_t
SP_CSI_reporting_pucch
;
aperiodicCSI_triggerStateSelection_t
aperi_CSI_trigger
;
pdschTciStatesActDeact_t
pdsch_TCI_States_ActDeact
;
}
NR_UE_mac_ce_ctrl_t
;
#endif
typedef
struct
NR_sched_pucch
{
int
frame
;
int
ul_slot
;
...
...
@@ -195,10 +263,15 @@ typedef struct {
NR_sched_pucch
*
sched_pucch
;
uint16_t
ta_timer
;
int16_t
ta_update
;
int
dummy
;
#ifdef GES_SUPPORT
NR_UE_mac_ce_ctrl_t
UE_mac_ce_ctrl
;
// MAC CE related information
#endif
}
NR_UE_sched_ctrl_t
;
/*! \brief UE list used by gNB to order UEs/CC for scheduling*/
typedef
struct
{
<<<<<<<
3
bce9a7b85f6f8dff8ba2f98142451a90fd8f8bd
DLSCH_PDU
DLSCH_pdu
[
4
][
MAX_MOBILES_PER_GNB
];
/// scheduling control info
NR_UE_sched_ctrl_t
UE_sched_ctrl
[
MAX_MOBILES_PER_GNB
];
...
...
@@ -211,6 +284,20 @@ typedef struct {
boolean_t
active
[
MAX_MOBILES_PER_GNB
];
rnti_t
rnti
[
MAX_MOBILES_PER_GNB
];
NR_CellGroupConfig_t
*
secondaryCellGroup
[
MAX_MOBILES_PER_GNB
];
=======
DLSCH_PDU
DLSCH_pdu
[
4
][
MAX_MOBILES_PER_GNB
];
/// scheduling control info
UE_sched_ctrl_t
UE_sched_ctrl
[
MAX_MOBILES_PER_GNB
];
int
next
[
MAX_MOBILES_PER_GNB
];
int
head
;
int
next_ul
[
MAX_MOBILES_PER_GNB
];
int
head_ul
;
int
avail
;
int
num_UEs
;
boolean_t
active
[
MAX_MOBILES_PER_GNB
];
rnti_t
rnti
[
MAX_MOBILES_PER_GNB
];
NR_CellGroupConfig_t
*
secondaryCellGroup
[
MAX_MOBILES_PER_GNB
];
>>>>>>>
GlobalEdge
:
CSI
and
TCI
related
MAC
CE
intial
commit
}
NR_UE_list_t
;
/*! \brief top level gNB MAC structure */
...
...
@@ -280,6 +367,65 @@ typedef struct gNB_MAC_INST_s {
}
gNB_MAC_INST
;
typedef
struct
{
<<<<<<<
3
bce9a7b85f6f8dff8ba2f98142451a90fd8f8bd
uint8_t
format_indicator
;
//1 bit
uint16_t
frequency_domain_assignment
;
//up to 16 bits
uint8_t
time_domain_assignment
;
// 4 bits
uint8_t
frequency_hopping_flag
;
//1 bit
uint8_t
ra_preamble_index
;
//6 bits
uint8_t
ss_pbch_index
;
//6 bits
uint8_t
prach_mask_index
;
//4 bits
uint8_t
vrb_to_prb_mapping
;
//0 or 1 bit
uint8_t
mcs
;
//5 bits
uint8_t
ndi
;
//1 bit
uint8_t
rv
;
//2 bits
uint8_t
harq_pid
;
//4 bits
uint8_t
dai
;
//0, 2 or 4 bits
uint8_t
dai1
;
//1 or 2 bits
uint8_t
dai2
;
//0 or 2 bits
uint8_t
tpc
;
//2 bits
uint8_t
pucch_resource_indicator
;
//3 bits
uint8_t
pdsch_to_harq_feedback_timing_indicator
;
//0, 1, 2 or 3 bits
uint8_t
short_messages_indicator
;
//2 bits
uint8_t
short_messages
;
//8 bits
uint8_t
tb_scaling
;
//2 bits
uint8_t
carrier_indicator
;
//0 or 3 bits
uint8_t
bwp_indicator
;
//0, 1 or 2 bits
uint8_t
prb_bundling_size_indicator
;
//0 or 1 bits
uint8_t
rate_matching_indicator
;
//0, 1 or 2 bits
uint8_t
zp_csi_rs_trigger
;
//0, 1 or 2 bits
uint8_t
transmission_configuration_indication
;
//0 or 3 bits
uint8_t
srs_request
;
//2 bits
uint8_t
cbgti
;
//CBG Transmission Information: 0, 2, 4, 6 or 8 bits
uint8_t
cbgfi
;
//CBG Flushing Out Information: 0 or 1 bit
uint8_t
dmrs_sequence_initialization
;
//0 or 1 bit
uint8_t
srs_resource_indicator
;
uint8_t
precoding_information
;
uint8_t
csi_request
;
uint8_t
ptrs_dmrs_association
;
uint8_t
beta_offset_indicator
;
//0 or 2 bits
uint8_t
slot_format_indicator_count
;
uint8_t
*
slot_format_indicators
;
uint8_t
pre_emption_indication_count
;
uint16_t
*
pre_emption_indications
;
//14 bit
uint8_t
block_number_count
;
uint8_t
*
block_numbers
;
uint8_t
ul_sul_indicator
;
//0 or 1 bit
uint8_t
antenna_ports
;
uint16_t
reserved
;
//1_0/C-RNTI:10 bits, 1_0/P-RNTI: 6 bits, 1_0/SI-&RA-RNTI: 16 bits
uint16_t
padding
;
=======
uint8_t
format_indicator
;
//1 bit
uint16_t
frequency_domain_assignment
;
//up to 16 bits
uint8_t
time_domain_assignment
;
// 4 bits
...
...
@@ -336,6 +482,7 @@ typedef struct {
uint16_t
reserved
;
//1_0/C-RNTI:10 bits, 1_0/P-RNTI: 6 bits, 1_0/SI-&RA-RNTI: 16 bits
uint16_t
padding
;
>>>>>>>
GlobalEdge
:
CSI
and
TCI
related
MAC
CE
intial
commit
}
dci_pdu_rel15_t
;
...
...
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