Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Worker.N
openairinterface5G
Commits
1a04ba5b
Commit
1a04ba5b
authored
7 years ago
by
Cédric Roux
Browse files
Options
Downloads
Patches
Plain Diff
bugfix: do not modify dlsch structure at all in case of PDCCH order for RAPROC
introduce a new function to deal with this special case
parent
f9649157
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+141
-23
141 additions, 23 deletions
openair1/PHY/LTE_TRANSPORT/dci_tools.c
with
141 additions
and
23 deletions
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+
141
−
23
View file @
1a04ba5b
...
...
@@ -861,13 +861,152 @@ uint8_t get_transmission_mode(module_id_t Mod_id, uint8_t CC_id, rnti_t rnti)
}
*/
void
fill_dci_and_dlsch
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
DCI_ALLOC_t
*
dci_alloc
,
nfapi_dl_config_dci_dl_pdu
*
pdu
)
{
void
fill_pdcch_order
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
DCI_ALLOC_t
*
dci_alloc
,
nfapi_dl_config_dci_dl_pdu
*
pdu
)
{
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
uint8_t
*
dci_pdu
=
&
dci_alloc
->
dci_pdu
[
0
];
nfapi_dl_config_dci_dl_pdu_rel8_t
*
rel8
=
&
pdu
->
dci_dl_pdu_rel8
;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
dci_alloc
->
firstCCE
=
rel8
->
cce_idx
;
dci_alloc
->
L
=
rel8
->
aggregation_level
;
dci_alloc
->
rnti
=
rel8
->
rnti
;
dci_alloc
->
harq_pid
=
rel8
->
harq_process
;
dci_alloc
->
ra_flag
=
0
;
dci_alloc
->
format
=
format1A
;
LOG_D
(
PHY
,
"NFAPI: DCI format %d, nCCE %d, L %d, rnti %x,harq_pid %d
\n
"
,
rel8
->
dci_format
,
rel8
->
cce_idx
,
rel8
->
aggregation_level
,
rel8
->
rnti
,
rel8
->
harq_process
);
switch
(
fp
->
N_RB_DL
)
{
case
6
:
if
(
fp
->
frame_type
==
TDD
)
{
dci_alloc
->
dci_length
=
sizeof_DCI1A_1_5MHz_TDD_1_6_t
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
type
=
1
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
mcs
=
rel8
->
mcs_1
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
ndi
=
rel8
->
new_data_indicator_1
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
rballoc
=
rel8
->
resource_block_coding
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
rv
=
rel8
->
redundancy_version_1
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
TPC
=
rel8
->
tpc
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
((
DCI1A_1_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
dai
=
rel8
->
downlink_assignment_index
;
}
else
{
dci_alloc
->
dci_length
=
sizeof_DCI1A_1_5MHz_FDD_t
;
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
type
=
1
;
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
mcs
=
rel8
->
mcs_1
;
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
ndi
=
rel8
->
new_data_indicator_1
;
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
rballoc
=
rel8
->
resource_block_coding
;
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
rv
=
rel8
->
redundancy_version_1
;
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
TPC
=
rel8
->
tpc
;
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
break
;
case
25
:
if
(
fp
->
frame_type
==
TDD
)
{
dci_alloc
->
dci_length
=
sizeof_DCI1A_5MHz_TDD_1_6_t
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
type
=
1
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
mcs
=
rel8
->
mcs_1
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
ndi
=
rel8
->
new_data_indicator_1
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
rballoc
=
rel8
->
resource_block_coding
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
rv
=
rel8
->
redundancy_version_1
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
TPC
=
rel8
->
tpc
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
((
DCI1A_5MHz_TDD_1_6_t
*
)
dci_pdu
)
->
dai
=
rel8
->
downlink_assignment_index
;
// printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
else
{
dci_alloc
->
dci_length
=
sizeof_DCI1A_5MHz_FDD_t
;
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
type
=
1
;
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
mcs
=
rel8
->
mcs_1
;
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
ndi
=
rel8
->
new_data_indicator_1
;
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
rballoc
=
rel8
->
resource_block_coding
;
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
rv
=
rel8
->
redundancy_version_1
;
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
TPC
=
rel8
->
tpc
;
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
break
;
case
50
:
if
(
fp
->
frame_type
==
TDD
)
{
dci_alloc
->
dci_length
=
sizeof_DCI1A_10MHz_TDD_1_6_t
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
type
=
1
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
mcs
=
rel8
->
mcs_1
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
ndi
=
rel8
->
new_data_indicator_1
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
rballoc
=
rel8
->
resource_block_coding
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
rv
=
rel8
->
redundancy_version_1
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
TPC
=
rel8
->
tpc
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
((
DCI1A_10MHz_TDD_1_6_t
*
)
dci_pdu
)
->
dai
=
rel8
->
downlink_assignment_index
;
// printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
else
{
dci_alloc
->
dci_length
=
sizeof_DCI1A_10MHz_FDD_t
;
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
type
=
1
;
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
mcs
=
rel8
->
mcs_1
;
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
ndi
=
rel8
->
new_data_indicator_1
;
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
rballoc
=
rel8
->
resource_block_coding
;
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
rv
=
rel8
->
redundancy_version_1
;
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
TPC
=
rel8
->
tpc
;
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
break
;
case
100
:
if
(
fp
->
frame_type
==
TDD
)
{
dci_alloc
->
dci_length
=
sizeof_DCI1A_20MHz_TDD_1_6_t
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
type
=
1
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
mcs
=
rel8
->
mcs_1
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
ndi
=
rel8
->
new_data_indicator_1
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
rballoc
=
rel8
->
resource_block_coding
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
rv
=
rel8
->
redundancy_version_1
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
TPC
=
rel8
->
tpc
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
((
DCI1A_20MHz_TDD_1_6_t
*
)
dci_pdu
)
->
dai
=
rel8
->
downlink_assignment_index
;
// printf("TDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
else
{
dci_alloc
->
dci_length
=
sizeof_DCI1A_20MHz_FDD_t
;
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
type
=
1
;
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
mcs
=
rel8
->
mcs_1
;
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
ndi
=
rel8
->
new_data_indicator_1
;
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
rballoc
=
rel8
->
resource_block_coding
;
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
rv
=
rel8
->
redundancy_version_1
;
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
TPC
=
rel8
->
tpc
;
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
break
;
}
LOG_I
(
PHY
,
"%d.%d: DCI 1A: rnti %x, PDCCH order to do PRACH
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
,
rel8
->
rnti
);
}
void
fill_dci_and_dlsch
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
DCI_ALLOC_t
*
dci_alloc
,
nfapi_dl_config_dci_dl_pdu
*
pdu
)
{
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
uint8_t
*
dci_pdu
=
&
dci_alloc
->
dci_pdu
[
0
];
nfapi_dl_config_dci_dl_pdu_rel8_t
*
rel8
=
&
pdu
->
dci_dl_pdu_rel8
;
/* check if this is a DCI 1A PDCCH order for RAPROC */
if
(
rel8
->
dci_format
==
NFAPI_DL_DCI_FORMAT_1A
&&
rel8
->
rnti_type
==
1
)
{
int
full_rb
;
switch
(
fp
->
N_RB_DL
)
{
case
6
:
full_rb
=
63
;
break
;
case
25
:
full_rb
=
511
;
break
;
case
50
:
full_rb
=
2047
;
break
;
case
100
:
full_rb
=
8191
;
break
;
default:
abort
();
}
if
(
rel8
->
resource_block_coding
==
full_rb
)
return
fill_pdcch_order
(
eNB
,
proc
,
dci_alloc
,
pdu
);
}
LTE_eNB_DLSCH_t
*
dlsch0
=
NULL
,
*
dlsch1
=
NULL
;
LTE_DL_eNB_HARQ_t
*
dlsch0_harq
=
NULL
,
*
dlsch1_harq
=
NULL
;
int
beamforming_mode
=
0
;
...
...
@@ -958,11 +1097,6 @@ LOG_D(PHY,"NFAPI: harq_pid %d harq_mask %x, round %d ndi (%d,%d) rnti type %d\n"
((
DCI1A_1_5MHz_FDD_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
// check if PDCCH order
if
(
rel8
->
resource_block_coding
==
63
)
{
dlsch0
->
active
=
0
;
return
;
}
AssertFatal
(
rel8
->
virtual_resource_block_assignment_flag
==
LOCALIZED
,
"Distributed RB allocation not done yet
\n
"
);
dlsch0_harq
->
rb_alloc
[
0
]
=
localRIV2alloc_LUT6
[
rel8
->
resource_block_coding
];
dlsch0_harq
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
...
...
@@ -993,12 +1127,6 @@ LOG_D(PHY,"NFAPI: harq_pid %d harq_mask %x, round %d ndi (%d,%d) rnti type %d\n"
((
DCI1A_5MHz_FDD_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
// check if PDCCH order
if
(
rel8
->
resource_block_coding
==
511
)
{
dlsch0
->
active
=
0
;
return
;
}
AssertFatal
(
rel8
->
virtual_resource_block_assignment_flag
==
LOCALIZED
,
"Distributed RB allocation not done yet
\n
"
);
dlsch0_harq
->
rb_alloc
[
0
]
=
localRIV2alloc_LUT25
[
rel8
->
resource_block_coding
];
dlsch0_harq
->
vrb_type
=
rel8
->
virtual_resource_block_assignment_flag
;
...
...
@@ -1029,11 +1157,6 @@ LOG_D(PHY,"NFAPI: harq_pid %d harq_mask %x, round %d ndi (%d,%d) rnti type %d\n"
((
DCI1A_10MHz_FDD_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
// check if PDCCH order
if
(
rel8
->
resource_block_coding
==
2047
)
{
dlsch0
->
active
=
0
;
return
;
}
AssertFatal
(
rel8
->
virtual_resource_block_assignment_flag
==
LOCALIZED
,
"Distributed RB allocation not done yet
\n
"
);
dlsch0_harq
->
rb_alloc
[
0
]
=
localRIV2alloc_LUT50_0
[
rel8
->
resource_block_coding
];
dlsch0_harq
->
rb_alloc
[
1
]
=
localRIV2alloc_LUT50_1
[
rel8
->
resource_block_coding
];
...
...
@@ -1065,11 +1188,6 @@ LOG_D(PHY,"NFAPI: harq_pid %d harq_mask %x, round %d ndi (%d,%d) rnti type %d\n"
((
DCI1A_20MHz_FDD_t
*
)
dci_pdu
)
->
harq_pid
=
rel8
->
harq_process
;
// printf("FDD 1A: mcs %d, rballoc %x,rv %d, NPRB %d\n",mcs,rballoc,rv,NPRB);
}
// check if PDCCH order
if
(
rel8
->
resource_block_coding
==
8191
)
{
dlsch0
->
active
=
0
;
return
;
}
AssertFatal
(
rel8
->
virtual_resource_block_assignment_flag
==
LOCALIZED
,
"Distributed RB allocation not done yet
\n
"
);
dlsch0_harq
->
rb_alloc
[
0
]
=
localRIV2alloc_LUT100_0
[
rel8
->
resource_block_coding
];
dlsch0_harq
->
rb_alloc
[
1
]
=
localRIV2alloc_LUT100_1
[
rel8
->
resource_block_coding
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment