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
0a4fd473
Commit
0a4fd473
authored
Aug 17, 2017
by
mohamed.said
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated fill_rar_brY
parent
874e0cf9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
62 deletions
+73
-62
openair2/LAYER2/MAC/rar_tools.c
openair2/LAYER2/MAC/rar_tools.c
+26
-17
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+47
-45
No files found.
openair2/LAYER2/MAC/rar_tools.c
View file @
0a4fd473
...
...
@@ -132,12 +132,12 @@ unsigned short fill_rar(
#ifdef Rel14
//------------------------------------------------------------------------------
unsigned
short
fill_rar_br
(
eNB_MAC_INST
*
eNB
,
int
CC_id
,
RA_TEMPLATE
*
RA_template
,
const
frame_t
frameP
,
const
sub_frame_t
subframeP
,
uint8_t
*
const
dlsch_buffer
,
const
uint8_t
ce_level
int
CC_id
,
RA_TEMPLATE
*
RA_template
,
const
frame_t
frameP
,
const
sub_frame_t
subframeP
,
uint8_t
*
const
dlsch_buffer
,
const
uint8_t
ce_level
)
//------------------------------------------------------------------------------
{
...
...
@@ -147,7 +147,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
uint8_t
*
rar
=
(
uint8_t
*
)(
dlsch_buffer
+
1
);
int
i
;
uint8_t
nb
,
rballoc
,
reps
;
uint8_t
mcs
,
TPC
,
ULdelay
,
cqireq
;
uint8_t
mcs
,
TPC
,
ULdelay
,
cqireq
,
mpdcch_nb_index
;
int
input_buffer_length
;
...
...
@@ -163,10 +163,10 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
int
N_NB_index
;
AssertFatal
(
1
==
0
,
"RAR for BL/CE Still to be finished ...
\n
"
);
AssertFatal
(
1
==
0
,
"RAR for BL/CE Still to be finished ...
\n
"
);
// Copy the Msg2 narrowband
RA_template
->
msg34_narrowband
=
RA_template
->
msg2_narrowband
;
RA_template
->
msg34_narrowband
=
RA_template
->
msg2_narrowband
;
if
(
ce_level
<
2
)
{
//CE Level 0,1, CEmodeA
input_buffer_length
=
6
;
...
...
@@ -177,16 +177,25 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
rar
[
5
]
=
(
uint8_t
)(
RA_template
->
rnti
&
0xff
);
//cc->RA_template[ra_idx].timing_offset = 0;
nb
=
0
;
rballoc
=
mac_computeRIV
(
6
,
1
+
ce_level
,
1
);
// one PRB only for UL Grant in position 1+ce_level within Narrowband
rar
[
1
]
|=
(
rballoc
&
15
)
<<
(
4
-
N_NB_index
);
// Hopping = 0 (bit 3), 3 MSBs of rballoc
reps
=
4
;
mcs
=
7
;
TPC
=
3
;
// no power increase
reps
=
0
;
mcs
=
7
;
TPC
=
3
;
// no power increase
ULdelay
=
0
;
cqireq
=
0
;
rar
[
2
]
|=
((
mcs
&
0x8
)
>>
3
);
// mcs 10
rar
[
3
]
=
(((
mcs
&
0x7
)
<<
5
))
|
((
TPC
&
7
)
<<
2
)
|
((
ULdelay
&
1
)
<<
1
)
|
(
cqireq
&
1
);
mpdcch_nb_index
=
0
;
rballoc
=
mac_computeRIV
(
6
,
1
+
ce_level
,
1
);
// one PRB only for UL Grant in position 1+ce_level within Narrowband
unsigned
int
buffer
=
0
;
buffer
|=
N_NB_index
<<
(
16
+
(
4
-
N_NB_index
));
buffer
|=
((
rballoc
&
0xFF
)
<<
(
12
+
(
4
-
N_NB_index
)));
buffer
|=
((
reps
&
0x03
)
<<
(
10
+
(
4
-
N_NB_index
)));
buffer
|=
((
mcs
&
0x07
)
<<
(
7
+
(
4
-
N_NB_index
)));
buffer
|=
((
TPC
&
0x07
)
<<
(
4
+
(
4
-
N_NB_index
)));
buffer
|=
((
cqireq
&
0x01
)
<<
(
3
+
(
4
-
N_NB_index
)));
buffer
|=
((
ULdelay
&
0x01
)
<<
(
2
+
(
4
-
N_NB_index
)));
buffer
|=
((
ULdelay
&
0x01
)
<<
(
4
-
N_NB_index
));
rar
[
1
]
=
(
buffer
>>
12
)
&
0x0F
;
rar
[
2
]
=
(
buffer
>>
8
)
&
0xFF
;
rar
[
3
]
=
buffer
&
0xFF
;
}
else
{
// CE level 2,3 => CEModeB
...
...
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
0a4fd473
...
...
@@ -2333,17 +2333,17 @@ do_RRCConnectionSetup_BR(
// CQI ReportConfig
/// TODO to be reviewed
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
));
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
));
#if defined(Rel10) || defined(Rel14)
*
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
=
CQI_ReportModeAperiodic_rm30
;
*
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
=
CQI_ReportModeAperiodic_rm30
;
#else
*
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportModeAperiodic
=
CQI_ReportConfig__cqi_ReportModeAperiodic_rm30
;
// HLC CQI, no PMI
#endif
physicalConfigDedicated2
->
cqi_ReportConfig
->
nomPDSCH_RS_EPRE_Offset
=
0
;
// 0 dB
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic=NULL;
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportPeriodic
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportPeriodic
));
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportPeriodic
->
present
=
CQI_ReportPeriodic_PR_release
;
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportPeriodic
=
CALLOC
(
1
,
sizeof
(
*
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportPeriodic
));
physicalConfigDedicated2
->
cqi_ReportConfig
->
cqi_ReportPeriodic
->
present
=
CQI_ReportPeriodic_PR_release
;
/*
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_setup;
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex = 0; // n2_pucch
...
...
@@ -2357,46 +2357,46 @@ do_RRCConnectionSetup_BR(
/// TODO to be reviewed
if
(
rrc
->
srs_enable
[
CC_id
])
{
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
present
=
SoundingRS_UL_ConfigDedicated_PR_setup
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_Bandwidth
=
SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_HoppingBandwidth
=
SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
freqDomainPosition
=
0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
duration
=
1
;
if
(
carrier
->
sib1
->
tdd_Config
==
NULL
)
{
// FDD
if
(
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
present
==
SoundingRS_UL_ConfigCommon_PR_setup
)
if
(
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
srs_SubframeConfig
!=
0
)
LOG_W
(
RRC
,
"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!
\n
"
,
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
srs_SubframeConfig
);
if
(
ue_context_pP
->
local_uid
>=
20
)
LOG_W
(
RRC
,
"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!
\n
"
,
ue_context_pP
->
local_uid
);
//the current code will allow for 20 UEs - to be revised for more
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
=
7
+
ue_context_pP
->
local_uid
/
2
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
=
ue_context_pP
->
local_uid
%
2
;
}
else
{
if
(
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
present
==
SoundingRS_UL_ConfigCommon_PR_setup
)
if
(
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
srs_SubframeConfig
!=
7
)
{
LOG_W
(
RRC
,
"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!
\n
"
,
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
srs_SubframeConfig
,
carrier
->
sib1
->
tdd_Config
->
subframeAssignment
);
}
if
(
ue_context_pP
->
local_uid
>=
6
)
LOG_W
(
RRC
,
"This code has been optimized for up to 6 UEs, but current UE_id is %d. Expect undefined behaviour!
\n
"
,
ue_context_pP
->
local_uid
);
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
=
17
+
ue_context_pP
->
local_uid
/
2
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
=
ue_context_pP
->
local_uid
%
2
;
}
LOG_W
(
RRC
,
"local UID %d, srs ConfigIndex %d, TransmissionComb %d
\n
"
,
ue_context_pP
->
local_uid
,
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
,
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
);
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
present
=
SoundingRS_UL_ConfigDedicated_PR_setup
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_Bandwidth
=
SoundingRS_UL_ConfigDedicated__setup__srs_Bandwidth_bw0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_HoppingBandwidth
=
SoundingRS_UL_ConfigDedicated__setup__srs_HoppingBandwidth_hbw0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
freqDomainPosition
=
0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
duration
=
1
;
if
(
carrier
->
sib1
->
tdd_Config
==
NULL
)
{
// FDD
if
(
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
present
==
SoundingRS_UL_ConfigCommon_PR_setup
)
if
(
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
srs_SubframeConfig
!=
0
)
LOG_W
(
RRC
,
"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!
\n
"
,
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
srs_SubframeConfig
);
if
(
ue_context_pP
->
local_uid
>=
20
)
LOG_W
(
RRC
,
"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!
\n
"
,
ue_context_pP
->
local_uid
);
//the current code will allow for 20 UEs - to be revised for more
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
=
7
+
ue_context_pP
->
local_uid
/
2
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
=
ue_context_pP
->
local_uid
%
2
;
}
else
{
if
(
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
present
==
SoundingRS_UL_ConfigCommon_PR_setup
)
if
(
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
srs_SubframeConfig
!=
7
)
{
LOG_W
(
RRC
,
"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!
\n
"
,
carrier
->
sib2
->
radioResourceConfigCommon
.
soundingRS_UL_ConfigCommon
.
choice
.
setup
.
srs_SubframeConfig
,
carrier
->
sib1
->
tdd_Config
->
subframeAssignment
);
}
if
(
ue_context_pP
->
local_uid
>=
6
)
LOG_W
(
RRC
,
"This code has been optimized for up to 6 UEs, but current UE_id is %d. Expect undefined behaviour!
\n
"
,
ue_context_pP
->
local_uid
);
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
=
17
+
ue_context_pP
->
local_uid
/
2
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
=
ue_context_pP
->
local_uid
%
2
;
}
LOG_W
(
RRC
,
"local UID %d, srs ConfigIndex %d, TransmissionComb %d
\n
"
,
ue_context_pP
->
local_uid
,
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
srs_ConfigIndex
,
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
transmissionComb
);
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
cyclicShift
=
SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0
;
physicalConfigDedicated2
->
soundingRS_UL_ConfigDedicated
->
choice
.
setup
.
cyclicShift
=
SoundingRS_UL_ConfigDedicated__setup__cyclicShift_cs0
;
}
//AntennaInfoDedicated
...
...
@@ -2530,11 +2530,13 @@ do_RRCConnectionSetup_BR(
// FIXME allocate physicalConfigDedicated2->ext7
physicalConfigDedicated2
->
ext7
=
CALLOC
(
1
,
sizeof
(
struct
PhysicalConfigDedicated__ext7
));
physicalConfigDedicated2
->
ext7
->
pdsch_ConfigDedicated_v1310
=
NULL
;
physicalConfigDedicated2
->
ext7
->
pdsch_ConfigDedicated_v1310
=
NULL
;
// has some parameters to be filled
physicalConfigDedicated2
->
ext7
->
pusch_ConfigDedicated_r13
=
NULL
;
physicalConfigDedicated2
->
ext7
->
pucch_ConfigDedicated_r13
=
NULL
;
physicalConfigDedicated2
->
ext7
->
pdcch_CandidateReductions_r13
=
NULL
;
physicalConfigDedicated2
->
ext7
->
pucch_ConfigDedicated_r13
=
NULL
;
physicalConfigDedicated2
->
ext7
->
cqi_ReportConfig_v1310
=
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