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
94c433d6
Commit
94c433d6
authored
Aug 17, 2017
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integration of RAR and Msg3 programming for eMTC
parent
322f8cbb
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
205 additions
and
66 deletions
+205
-66
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+89
-7
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+6
-0
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+105
-54
openair2/LAYER2/MAC/rar_tools.c
openair2/LAYER2/MAC/rar_tools.c
+5
-5
No files found.
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
94c433d6
...
...
@@ -1018,7 +1018,15 @@ handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
nfapi_ul_config_request_pdu_t
*
ul_config_pdu
)
{
nfapi_ul_config_ulsch_pdu_rel8_t
*
rel8
=
&
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
;
uint16_t
*
RIV2nb_rb_LUT
,
*
RIV2first_rb_LUT
;
uint16_t
RIV_max
;
uint16_t
use_srs
=
0
;
int8_t
UE_id
;
LTE_eNB_ULSCH_t
*
ulsch
;
LTE_UL_eNB_HARQ_t
*
ulsch_harq
;
// check if we have received a dci for this ue and ulsch descriptor is configured
if
(
ul_config_pdu
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
)
{
...
...
@@ -1026,6 +1034,80 @@ handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
"No existing UE ULSCH for rnti %x
\n
"
,
rel8
->
rnti
);
AssertFatal
(
eNB
->
ulsch
[
UE_id
]
->
harq_mask
>
0
,
"ulsch for UE_id %d is not active
\n
"
,
UE_id
);
LOG_I
(
PHY
,
"Applying UL config for UE %d, rnti %x
\n
"
,
UE_id
,
rel8
->
rnti
);
/*
#ifdef Rel14
nfapi_ul_config_ulsch_pdu_rel13_t *rel13 = &ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13;
int harq_pid = rel8->harq_process_number;
if (rel13->ue_type > 0) { // This is a BL/CE UE, retrieve PUSCH programming
ulsch = eNB->ulsch[UE_id];
ulsch_harq = ulsch->harq_processes[harq_pid];
switch (eNB->frame_parms.N_RB_DL) {
case 6:
RIV2nb_rb_LUT = &RIV2nb_rb_LUT6[0];
RIV2first_rb_LUT = &RIV2first_rb_LUT6[0];
RIV_max = RIV_max6;
break;
case 25:
RIV2nb_rb_LUT = &RIV2nb_rb_LUT25[0];
RIV2first_rb_LUT = &RIV2first_rb_LUT25[0];
RIV_max = RIV_max25;
break;
case 50:
RIV2nb_rb_LUT = &RIV2nb_rb_LUT50[0];
RIV2first_rb_LUT = &RIV2first_rb_LUT50[0];
RIV_max = RIV_max50;
break;
case 100:
RIV2nb_rb_LUT = &RIV2nb_rb_LUT100[0];
RIV2first_rb_LUT = &RIV2first_rb_LUT100[0];
RIV_max = RIV_max100;
break;
default:
DevParam(frame_parms->N_RB_DL, harq_pid, 0);
break;
}
ulsch_harq->first_rb = rel8->resource_block_start;
ulsch_harq->nb_rb = rel8->number_of_resource_blocks;
ulsch_harq->O_RI = 0;//1;
ulsch_harq->Or2 = 0;
ulsch_harq->Or1 = 0;
ulsch_harq->O_ACK = 0;//2;
ulsch->beta_offset_cqi_times8 = 18;
ulsch->beta_offset_ri_times8 = 10;
ulsch->beta_offset_harqack_times8 = 16;
ulsch->rnti = rel8->rnti;
ulsch->harq_mask = 1<<harq_pid;
if (ulsch_harq->round == 0) {
ulsch_harq->status = ACTIVE;
ulsch_harq->rvidx = 0;
//ulsch_harq->TBS = dlsch_tbs25[ulsch_harq->mcs][ulsch_harq->nb_rb-1];
ulsch_harq->TBS = TBStable[get_I_TBS_UL(ulsch_harq->mcs)][ulsch_harq->nb_rb-1];
ulsch_harq->Msc_initial = 12*ulsch_harq->nb_rb;
ulsch_harq->Nsymb_initial = 9;
ulsch_harq->round = 0;
} else {
ulsch_harq->rvidx = 0;
ulsch_harq->round++;
}
use_srs = is_srs_occasion_common(frame_parms,ulsch_harq->frame,ulsch_harq->subframe);
ulsch_harq->Nsymb_pusch = 12-(frame_parms->Ncp<<1)-(use_srs==0?0:1);
ulsch_harq->srs_active = use_srs;
}
#endif
*/
}
else
if
(
ul_config_pdu
==
NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE
)
{
AssertFatal
((
UE_id
=
find_uci
(
rel8
->
rnti
,
proc
->
frame_tx
,
proc
->
subframe_tx
,
eNB
,
SEARCH_EXIST
))
>=
0
,
...
...
@@ -1033,19 +1115,19 @@ handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
handle_uci_harq_pdu
(
eNB
,
proc
,
ul_config_pdu
);
}
else
if
(
ul_config_pdu
==
NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE
)
{
}
else
if
(
ul_config_pdu
==
NFAPI_UL_CONFIG_UCI_CQI_HARQ_PDU_TYPE
)
{
}
else
if
(
ul_config_pdu
==
NFAPI_UL_CONFIG_UCI_CQI_SR_PDU_TYPE
)
{
}
else
if
(
ul_config_pdu
==
NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE
)
{
}
else
if
(
ul_config_pdu
==
NFAPI_UL_CONFIG_UCI_SR_HARQ_PDU_TYPE
)
{
}
}
...
...
@@ -1151,7 +1233,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
transport_blocks
-
1
,
TX_req
->
tx_request_body
.
tx_pdu_list
[
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
].
segments
[
0
].
segment_data
);
if
(
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
rnti
==
eNB
->
preamble_list
[
0
].
preamble_rel8
.
rnti
)
{
// is RAR pdu
LOG_I
(
PHY
,
"Frame %d, Subframe %d: Received LTE RAR pdu, programming based on UL Grant
\n
"
);
generate_eNB_ulsch_params_from_rar
(
eNB
,
TX_req
->
tx_request_body
.
tx_pdu_list
[
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
pdu_index
].
segments
[
0
].
segment_data
,
frame
,
...
...
@@ -1197,7 +1279,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
for
(
i
=
0
;
i
<
number_ul_pdu
;
i
++
)
{
ul_config_pdu
=
&
UL_req
->
ul_config_request_body
.
ul_config_pdu_list
[
i
];
LOG_
D
(
PHY
,
"NFAPI: ul_pdu %d : type %d
\n
"
,
i
,
ul_config_pdu
->
pdu_type
);
LOG_
I
(
PHY
,
"NFAPI: ul_pdu %d : type %d
\n
"
,
i
,
ul_config_pdu
->
pdu_type
);
AssertFatal
(
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE
,
"Optional UL_PDU type %d not supported
\n
"
,
ul_config_pdu
->
pdu_type
);
...
...
openair2/LAYER2/MAC/defs.h
View file @
94c433d6
...
...
@@ -861,6 +861,12 @@ typedef struct {
int16_t
timing_offset
;
/// Timeout for RRC connection
int16_t
RRC_timer
;
/// Msg3 first RB
uint8_t
msg3_first_rb
;
/// Msg3 number of RB
uint8_t
msg3_nb_rb
;
/// Msg3 MCS
uint8_t
msg3_mcs
;
/// Round of Msg3 HARQ
uint8_t
msg3_round
;
/// TBS used for Msg4
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
94c433d6
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/rar_tools.c
View file @
94c433d6
...
...
@@ -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
"
);
// Copy the Msg2 narrowband
RA_template
->
msg34_narrowband
=
RA_template
->
msg2_narrowband
;
RA_template
->
msg3_first_rb
=
ce_level
;
RA_template
->
msg3_nb_rb
=
2
;
if
(
ce_level
<
2
)
{
//CE Level 0,1, CEmodeA
input_buffer_length
=
6
;
...
...
@@ -183,7 +183,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
ULdelay
=
0
;
cqireq
=
0
;
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
rballoc
=
mac_computeRIV
(
6
,
RA_template
->
msg3_first_rb
,
RA_template
->
msg3_nb_rb
);
// 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
)));
...
...
@@ -204,8 +204,8 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
rar
[
3
]
=
(
uint8_t
)(
RA_template
->
rnti
>>
8
);
rar
[
4
]
=
(
uint8_t
)(
RA_template
->
rnti
&
0xff
);
}
LOG_
D
(
MAC
,
"[RAPROC] Frame %d
Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x,preamble %d/%d,TIMING OFFSET %d
\n
"
,
frameP
,
LOG_
I
(
MAC
,
"[RAPROC] Frame %d Subframe %d :
Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x,preamble %d/%d,TIMING OFFSET %d
\n
"
,
frameP
,
subframeP
,
*
(
uint8_t
*
)
rarh
,
rar
[
0
],
rar
[
1
],
rar
[
2
],
rar
[
3
],
rar
[
4
],
rar
[
5
],
ce_level
,
RA_template
->
rnti
,
...
...
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