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
c4a81c22
Commit
c4a81c22
authored
Mar 13, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes for TDD signaling.
parent
f8f6f003
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
72 additions
and
30 deletions
+72
-30
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+5
-4
openair1/SCHED/fapi_l1.c
openair1/SCHED/fapi_l1.c
+3
-3
openair1/SCHED/phy_procedures_lte_common.c
openair1/SCHED/phy_procedures_lte_common.c
+1
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+7
-7
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+3
-2
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+16
-7
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+31
-2
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+3
-3
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+2
-0
openair2/PHY_INTERFACE/IF_Module.c
openair2/PHY_INTERFACE/IF_Module.c
+1
-1
No files found.
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
c4a81c22
...
...
@@ -2660,7 +2660,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame
else
if
(
ulsch
->
harq_processes
[
harq_pid
]
->
n_DMRS
==
7
)
ulsch
->
harq_processes
[
harq_pid
]
->
n_DMRS2
=
9
;
LOG_
D
(
PHY
,
"[eNB %d][PUSCH %d] Frame %d, Subframe %d Programming PUSCH with n_DMRS2 %d (cshift %d) ulsch:ndi:%d ulsch_pdu:ndi:%d new_ulsch:%d status:%d ulsch_pdu:rvidx:%d
\n
"
,
LOG_
I
(
PHY
,
"[eNB %d][PUSCH %d] Frame %d, Subframe %d Programming PUSCH with n_DMRS2 %d (cshift %d) ulsch:ndi:%d ulsch_pdu:ndi:%d new_ulsch:%d status:%d ulsch_pdu:rvidx:%d
\n
"
,
eNB
->
Mod_id
,
harq_pid
,
frame
,
subframe
,
ulsch
->
harq_processes
[
harq_pid
]
->
n_DMRS2
,
ulsch
->
harq_processes
[
harq_pid
]
->
n_DMRS
,
...
...
@@ -2692,7 +2692,7 @@ void fill_ulsch(PHY_VARS_eNB *eNB,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame
else
ulsch
->
harq_processes
[
harq_pid
]
->
round
++
;
ulsch
->
rnti
=
ulsch_pdu
->
ulsch_pdu_rel8
.
rnti
;
LOG_
D
(
PHY
,
"Filling ULSCH %x (UE_id %d) (new_ulsch %d) for Frame %d, Subframe %d : harq_pid %d, status %d, handled %d, first_rb %d, nb_rb %d, rvidx %d, Qm %d, TBS %d, round %d
\n
"
,
LOG_
I
(
PHY
,
"Filling ULSCH %x (UE_id %d) (new_ulsch %d) for Frame %d, Subframe %d : harq_pid %d, status %d, handled %d, first_rb %d, nb_rb %d, rvidx %d, Qm %d, TBS %d, round %d
\n
"
,
ulsch
->
rnti
,
UE_id
,
new_ulsch
,
...
...
@@ -6465,9 +6465,9 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
{
uint8_t
ret
=
255
;
if
(
frame_parms
->
frame_type
==
FDD
)
{
//
if (frame_parms->frame_type == FDD) {
ret
=
(((
frame
*
10
)
+
subframe
)
&
7
);
}
else
{
/*
} else {
switch (frame_parms->tdd_config) {
...
...
@@ -6535,6 +6535,7 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
AssertFatal(ret!=255,
"invalid harq_pid(%d) at SFN/SF = %d/%d\n", (int8_t)ret, frame, subframe);
*/
return
ret
;
}
...
...
openair1/SCHED/fapi_l1.c
View file @
c4a81c22
...
...
@@ -537,7 +537,7 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
if
(
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
)
{
AssertFatal
((
UE_id
=
find_ulsch
(
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
,
eNB
,
SEARCH_EXIST_OR_FREE
))
>=
0
,
"No existing UE ULSCH for rnti %x
\n
"
,
rel8
->
rnti
);
LOG_
D
(
PHY
,
"Applying UL config for UE %d, rnti %x for
frame %d, subframe %d, modulation %d, rvidx %d
\n
"
,
UE_id
,
rel8
->
rnti
,
frame
,
subframe
,
rel8
->
modulation_type
,
rel8
->
redundancy_version
);
LOG_
I
(
PHY
,
"Applying UL config for UE %d, rnti %x in
frame %d, subframe %d, modulation %d, rvidx %d
\n
"
,
UE_id
,
rel8
->
rnti
,
frame
,
subframe
,
rel8
->
modulation_type
,
rel8
->
redundancy_version
);
fill_ulsch
(
eNB
,
&
ul_config_pdu
->
ulsch_pdu
,
frame
,
subframe
);
...
...
@@ -655,7 +655,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
eNB
->
pdcch_vars
[
subframe
&
1
].
num_dci
=
0
;
eNB
->
phich_vars
[
subframe
&
1
].
num_hi
=
0
;
LOG_
D
(
PHY
,
"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d hi_dci0:SFN/SF:%04d%d:pdus:%d ul_cfg:SFN/SF:%04d%d:pdus:%d num_pdcch_symbols:%d
\n
"
,
LOG_
I
(
PHY
,
"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d hi_dci0:SFN/SF:%04d%d:pdus:%d ul_cfg:SFN/SF:%04d%d:pdus:%d num_pdcch_symbols:%d
\n
"
,
frame
,
subframe
,
NFAPI_SFNSF2SFN
(
DL_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
DL_req
->
sfn_sf
),
number_dl_pdu
,
NFAPI_SFNSF2SFN
(
TX_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
TX_req
->
sfn_sf
),
TX_req
->
tx_request_body
.
number_of_pdus
,
...
...
@@ -831,7 +831,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
else
{
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_ULSCH_HARQ_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE
||
...
...
openair1/SCHED/phy_procedures_lte_common.c
View file @
c4a81c22
...
...
@@ -841,7 +841,7 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
uint8_t
phich_subframe_to_harq_pid
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint8_t
subframe
)
{
//LOG_D
(PHY,"phich_subframe_to_harq_pid.c: frame %d, subframe %d\n",frame,subframe);
LOG_I
(
PHY
,
"phich_subframe_to_harq_pid.c: frame %d, subframe %d
\n
"
,
frame
,
subframe
);
return
(
subframe2harq_pid
(
frame_parms
,
phich_frame2_pusch_frame
(
frame_parms
,
frame
,
subframe
),
phich_subframe2_pusch_subframe
(
frame_parms
,
subframe
)));
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
c4a81c22
...
...
@@ -1157,13 +1157,13 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
const
int
subframe
=
proc
->
subframe_rx
;
const
int
frame
=
proc
->
frame_rx
;
if
(
fp
->
frame_type
==
FDD
)
harq_pid
=
((
10
*
frame
)
+
subframe
)
&
7
;
else
harq_pid
=
subframe
%
10
;
harq_pid
=
((
10
*
frame
)
+
subframe
)
&
7
;
LOG_I
(
PHY
,
"Running eNB pusch procedures in %d.%d, harq_pid %d
\n
"
,
frame
,
subframe
,
harq_pid
);
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
ulsch
=
eNB
->
ulsch
[
i
];
ulsch_harq
=
ulsch
->
harq_processes
[
harq_pid
];
if
(
ulsch
->
rnti
>
0
)
LOG_
D
(
PHY
,
"eNB->ulsch[%d]->harq_processes[harq_pid:%d] SFN/SF:%04d%d: PUSCH procedures, UE %d/%x ulsch_harq[status:%d SFN/SF:%04d%d handled:%d]
\n
"
,
if
(
ulsch
->
rnti
>
0
)
LOG_
I
(
PHY
,
"eNB->ulsch[%d]->harq_processes[harq_pid:%d] SFN/SF:%04d%d: PUSCH procedures, UE %d/%x ulsch_harq[status:%d SFN/SF:%04d%d handled:%d]
\n
"
,
i
,
harq_pid
,
frame
,
subframe
,
i
,
ulsch
->
rnti
,
ulsch_harq
->
status
,
ulsch_harq
->
frame
,
ulsch_harq
->
subframe
,
ulsch_harq
->
handled
);
...
...
@@ -1182,7 +1182,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
eNB
->
rb_mask_ul
[
rb2
>>
5
]
|=
(
1
<<
(
rb2
&
31
));
}
LOG_
D
(
PHY
,
"[eNB %d] frame %d, subframe %d: Scheduling ULSCH Reception for UE %d
\n
"
,
eNB
->
Mod_id
,
frame
,
subframe
,
i
);
LOG_
I
(
PHY
,
"[eNB %d] frame %d, subframe %d: Scheduling ULSCH Reception for UE %d
\n
"
,
eNB
->
Mod_id
,
frame
,
subframe
,
i
);
nPRS
=
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
nPRS
[
subframe
<<
1
];
...
...
@@ -1190,7 +1190,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
fp
->
pusch_config_common
.
ul_ReferenceSignalsPUSCH
.
cyclicShift
+
nPRS
)
%
12
;
LOG_
D
(
PHY
,
LOG_
I
(
PHY
,
"[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, Qm %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, ), O_ACK %d, beta_cqi %d
\n
"
,
eNB
->
Mod_id
,
harq_pid
,
frame
,
subframe
,
ulsch_harq
->
dci_alloc
,
...
...
@@ -1223,7 +1223,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
stop_meas
(
&
eNB
->
ulsch_decoding_stats
);
LOG_
D
(
PHY
,
"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d ulsch_harq->cqi_crc_status:%d ackBits:%d ulsch_decoding_stats[t:%lld max:%lld]
\n
"
,
LOG_
I
(
PHY
,
"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d ulsch_harq->cqi_crc_status:%d ackBits:%d ulsch_decoding_stats[t:%lld max:%lld]
\n
"
,
eNB
->
Mod_id
,
harq_pid
,
frame
,
subframe
,
ulsch
->
rnti
,
...
...
@@ -1259,7 +1259,7 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
fill_crc_indication
(
eNB
,
i
,
frame
,
subframe
,
1
);
// indicate NAK to MAC
fill_rx_indication
(
eNB
,
i
,
frame
,
subframe
);
// indicate SDU to MAC
LOG_
D
(
PHY
,
"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)
\n
"
,
LOG_
I
(
PHY
,
"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)
\n
"
,
eNB
->
Mod_id
,
harq_pid
,
frame
,
subframe
,
i
,
ulsch_harq
->
round
,
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
c4a81c22
...
...
@@ -476,7 +476,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
nfapi_ul_config_request_pdu_t
*
ul_req_pdu
=
ul_req
->
ul_config_request_body
.
ul_config_pdu_list
;
*
ul_req
=
*
ul_req_tmp
;
LOG_D
(
MAC
,
"SFN.SF %d.%d: Copying %d UL pdus to UL_req (sfn_sf %d.%d)
\n
"
,
frameP
,
subframeP
,
ul_req
->
ul_config_request_body
.
number_of_pdus
,
ul_req
->
sfn_sf
>>
4
,
ul_req
->
sfn_sf
&
0xf
);
// Restore the pointer
ul_req
->
ul_config_request_body
.
ul_config_pdu_list
=
ul_req_pdu
;
ul_req
->
sfn_sf
=
(
frameP
<<
4
)
+
subframeP
;
...
...
@@ -484,9 +484,10 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
if
(
ul_req
->
ul_config_request_body
.
number_of_pdus
>
0
)
{
LOG_D
(
PHY
,
"%s() active NOW (frameP:%d subframeP:%d) pdus:%d
\n
"
,
__FUNCTION__
,
frameP
,
subframeP
,
ul_req
->
ul_config_request_body
.
number_of_pdus
);
LOG_D
(
MAC
,
"%s() active NOW (frameP:%d subframeP:%d) pdus:%d
\n
"
,
__FUNCTION__
,
frameP
,
subframeP
,
ul_req
->
ul_config_request_body
.
number_of_pdus
);
}
memcpy
((
void
*
)
ul_req
->
ul_config_request_body
.
ul_config_pdu_list
,
(
void
*
)
ul_req_tmp
->
ul_config_request_body
.
ul_config_pdu_list
,
ul_req
->
ul_config_request_body
.
number_of_pdus
*
sizeof
(
nfapi_ul_config_request_pdu_t
));
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
c4a81c22
...
...
@@ -126,9 +126,9 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
ra
->
rach_resource_type
-
1
,
ra
->
Msg3_frame
,
ra
->
Msg3_subframe
);
LOG_D
(
MAC
,
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d)
\n
"
,
"Frame %d, Subframe %d Adding Msg3 UL Config Request for (%d,%d) : (%d,%d)
, harq_pid %d
\n
"
,
frameP
,
subframeP
,
ra
->
Msg3_frame
,
ra
->
Msg3_subframe
,
ra
->
msg3_nb_rb
,
ra
->
msg3_round
);
ra
->
msg3_nb_rb
,
ra
->
msg3_round
,((
10
*
ra
->
Msg3_frame
)
+
ra
->
Msg3_subframe
)
&
7
);
ul_config_pdu
=
&
ul_req_body
->
ul_config_pdu_list
[
ul_req_body
->
number_of_pdus
];
...
...
@@ -195,7 +195,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
frequency_hopping_bits
=
0
;
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
new_data_indication
=
0
;
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
redundancy_version
=
rvseq
[
ra
->
msg3_round
];
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
harq_process_number
=
subframe2harqpid
(
cc
,
ra
->
Msg3_frame
,
ra
->
Msg3_subframe
);
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
harq_process_number
=
((
ra
->
Msg3_frame
*
10
)
+
ra
->
Msg3_subframe
)
&
7
;
//
subframe2harqpid(cc, ra->Msg3_frame, ra->Msg3_subframe);
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
ul_tx_mode
=
0
;
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
current_tx_nb
=
0
;
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
n_srs
=
1
;
...
...
@@ -470,7 +470,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
// Program UL processing for Msg3, same as regular LTE
get_Msg3alloc
(
&
cc
[
CC_idP
],
subframeP
,
frameP
,
&
ra
->
Msg3_frame
,
&
ra
->
Msg3_subframe
);
add_msg3
(
module_idP
,
CC_idP
,
ra
,
frameP
,
subframeP
);
//
add_msg3(module_idP, CC_idP, ra, frameP, subframeP);
fill_rar_br
(
mac
,
CC_idP
,
ra
,
frameP
,
subframeP
,
cc
[
CC_idP
].
RAR_pdu
.
payload
,
ra
->
rach_resource_type
-
1
);
...
...
@@ -572,7 +572,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
ra
->
Msg3_subframe
);
fill_rar
(
module_idP
,
CC_idP
,
ra
,
frameP
,
cc
[
CC_idP
].
RAR_pdu
.
payload
,
N_RB_DL
,
7
);
add_msg3
(
module_idP
,
CC_idP
,
ra
,
frameP
,
subframeP
);
//
add_msg3(module_idP, CC_idP, ra, frameP, subframeP);
ra
->
state
=
WAITMSG3
;
LOG_D
(
MAC
,
"[eNB %d][RAPROC] Frame %d, Subframe %d: state:WAITMSG3
\n
"
,
module_idP
,
frameP
,
subframeP
);
...
...
@@ -1359,6 +1359,8 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
LOG_D
(
MAC
,
"Schedule_RA %d.%d is_UL_sf %d
\n
"
,
frameP
,
subframeP
,
is_UL_sf
(
&
cc
[
CC_id
],
subframeP
));
// skip UL component carriers if TDD
if
(
is_UL_sf
(
&
cc
[
CC_id
],
subframeP
)
==
1
)
continue
;
...
...
@@ -1368,7 +1370,7 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
ra
=
(
RA_t
*
)
&
cc
[
CC_id
].
ra
[
i
];
//LOG_D
(MAC,"RA[state:%d]\n",ra->state);
LOG_I
(
MAC
,
"RA[state:%d]
\n
"
,
ra
->
state
);
if
(
ra
->
state
==
MSG2
)
generate_Msg2
(
module_idP
,
CC_id
,
frameP
,
subframeP
,
ra
);
...
...
@@ -1378,6 +1380,13 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
check_Msg4_retransmission
(
module_idP
,
CC_id
,
frameP
,
subframeP
,
ra
);
int
absSF
=
(
frameP
*
10
)
+
subframeP
;
int
msg3_absSF
=
(
ra
->
Msg3_frame
*
10
)
+
ra
->
Msg3_subframe
;
// This is done here to account for delay in TDD programming of Msg3
if
(
ra
->
state
==
WAITMSG3
&&
((
absSF
+
4
)
%
10240
)
==
msg3_absSF
)
add_msg3
(
module_idP
,
CC_id
,
ra
,
frameP
,
subframeP
);
}
// for i=0 .. N_RA_PROC-1
}
// CC_id
...
...
@@ -1417,7 +1426,7 @@ initiate_ra_proc(module_id_t module_idP,
#endif
/* Rel14 */
LOG_
D
(
MAC
,
LOG_
I
(
MAC
,
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d
\n
"
,
module_idP
,
CC_id
,
frameP
,
subframeP
,
preamble_index
);
#ifdef Rel14
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
c4a81c22
...
...
@@ -308,6 +308,34 @@ get_Msg3allocret(COMMON_channels_t * cc,
}
}
uint8_t
pusch_sf_to_phich_sfoffset
(
COMMON_channels_t
*
cc
,
sub_frame_t
subframe
)
{
if
(
cc
->
tdd_Config
==
NULL
)
return
(
4
);
else
switch
(
cc
->
tdd_Config
->
subframeAssignment
)
{
case
0
:
if
(
subframe
==
2
||
subframe
==
7
)
return
(
4
);
else
if
(
subframe
==
3
||
subframe
==
8
)
return
(
7
);
else
if
(
subframe
==
4
||
subframe
==
9
)
return
(
6
);
break
;
case
1
:
if
(
subframe
==
2
||
subframe
==
7
)
return
(
4
);
else
return
(
6
);
break
;
case
2
:
case
3
:
case
4
:
case
5
:
return
(
6
);
break
;
case
6
:
if
(
subframe
==
2
||
subframe
==
7
)
return
(
4
);
else
if
(
subframe
==
3
||
subframe
==
4
)
return
(
6
);
else
if
(
subframe
==
8
)
return
(
7
);
break
;
}
}
uint8_t
subframe2harqpid
(
COMMON_channels_t
*
cc
,
frame_t
frame
,
sub_frame_t
subframe
)
...
...
@@ -316,9 +344,9 @@ subframe2harqpid(COMMON_channels_t * cc, frame_t frame,
AssertFatal
(
cc
!=
NULL
,
"cc is null
\n
"
);
if
(
cc
->
tdd_Config
==
NULL
)
{
// FDD
//
if (cc->tdd_Config == NULL) { // FDD
ret
=
(((
frame
<<
1
)
+
subframe
)
&
7
);
}
else
{
/*
} else {
switch (cc->tdd_Config->subframeAssignment) {
case 1:
if ((subframe == 2) ||
...
...
@@ -381,6 +409,7 @@ subframe2harqpid(COMMON_channels_t * cc, frame_t frame,
(int) cc->tdd_Config->subframeAssignment);
}
}
*/
return
ret
;
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
c4a81c22
...
...
@@ -224,7 +224,7 @@ rx_sdu(const module_id_t enb_mod_idP,
radioResourceConfigCommon
->
rach_ConfigCommon
.
maxHARQ_Msg3Tx
);
LOG_
D
(
MAC
,
LOG_
I
(
MAC
,
"[eNB %d][PUSCH %d] CC_id %d [RAPROC Msg3] Received ULSCH sdu round %d from PHY (rnti %x, RA_id %d) ul_cqi %d
\n
"
,
enb_mod_idP
,
harq_pid
,
CC_idP
,
ra
[
RA_id
].
msg3_round
,
current_rnti
,
RA_id
,
ul_cqi
);
...
...
@@ -232,7 +232,7 @@ rx_sdu(const module_id_t enb_mod_idP,
first_rb
=
ra
->
msg3_first_rb
;
if
(
sduP
==
NULL
)
{
// we've got an error on Msg3
LOG_
D
(
MAC
,
LOG_
I
(
MAC
,
"[eNB %d] CC_id %d, RA %d ULSCH in error in round %d/%d
\n
"
,
enb_mod_idP
,
CC_idP
,
RA_id
,
ra
[
RA_id
].
msg3_round
,
...
...
@@ -704,7 +704,7 @@ rx_sdu(const module_id_t enb_mod_idP,
hi_dci0_req_body
->
number_of_hi
++
;
hi_dci0_req_body
->
sfnsf
=
sfnsf_add_subframe
(
frameP
,
subframeP
,
0
);
hi_dci0_req_body
->
tl
.
tag
=
NFAPI_HI_DCI0_REQUEST_BODY_TAG
;
hi_dci0_req
->
sfn_sf
=
sfnsf_add_subframe
(
frameP
,
subframeP
,
4
);
hi_dci0_req
->
sfn_sf
=
sfnsf_add_subframe
(
frameP
,
subframeP
,
pusch_sf_to_phich_sfoffset
(
&
RC
.
mac
[
enb_mod_idP
]
->
common_channels
[
CC_idP
],
subframeP
)
);
hi_dci0_req
->
header
.
message_id
=
NFAPI_HI_DCI0_REQUEST
;
/* NN--> FK: we could either check the payload, or use a phy helper to detect a false msg3 */
...
...
openair2/LAYER2/MAC/proto.h
View file @
c4a81c22
...
...
@@ -1034,6 +1034,8 @@ uint8_t getQm(uint8_t mcs);
uint8_t
subframe2harqpid
(
COMMON_channels_t
*
cc
,
frame_t
frame
,
sub_frame_t
subframe
);
uint8_t
pusch_sf_to_phich_sfoffset
(
COMMON_channels_t
*
cc
,
sub_frame_t
subframe
);
void
get_srs_pos
(
COMMON_channels_t
*
cc
,
uint16_t
isrs
,
uint16_t
*
psrsPeriodicity
,
uint16_t
*
psrsOffset
);
...
...
openair2/PHY_INTERFACE/IF_Module.c
View file @
c4a81c22
...
...
@@ -595,7 +595,7 @@ void UL_indication(UL_IND_t *UL_info)
sched_info
->
DL_req
=
&
mac
->
DL_req
[
CC_id
];
sched_info
->
HI_DCI0_req
=
&
mac
->
HI_DCI0_req
[
CC_id
];
if
((
mac
->
common_channels
[
CC_id
].
tdd_Config
==
NULL
)
||
(
is_UL_sf
(
&
mac
->
common_channels
[
CC_id
],
(
sched_info
->
subframe
+
sf_ahead
)
%
10
)
>
0
))
(
is_UL_sf
(
&
mac
->
common_channels
[
CC_id
],
sched_info
->
subframe
)
>
0
))
sched_info
->
UL_req
=
&
mac
->
UL_req
[
CC_id
];
else
sched_info
->
UL_req
=
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