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
wangjie
OpenXG-RAN
Commits
d11a22aa
Commit
d11a22aa
authored
Dec 15, 2016
by
Wilson W.K. Thong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added more logs for debugging false DCI0
parent
fce9f0b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
53 deletions
+75
-53
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+36
-23
openair1/PHY/LTE_TRANSPORT/phich.c
openair1/PHY/LTE_TRANSPORT/phich.c
+39
-30
No files found.
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
d11a22aa
...
@@ -5591,8 +5591,11 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
...
@@ -5591,8 +5591,11 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
printf("dci_tools.c: subframe2_harq_pid, subframe %d for FDD \n",subframe);
printf("dci_tools.c: subframe2_harq_pid, subframe %d for FDD \n",subframe);
#endif
#endif
*/
*/
uint8_t
ret
=
255
;
if
(
frame_parms
->
frame_type
==
FDD
)
{
if
(
frame_parms
->
frame_type
==
FDD
)
{
ret
urn
(((
frame
<<
1
)
+
subframe
)
&
7
);
ret
=
(((
frame
<<
1
)
+
subframe
)
&
7
);
}
else
{
}
else
{
switch
(
frame_parms
->
tdd_config
)
{
switch
(
frame_parms
->
tdd_config
)
{
...
@@ -5605,17 +5608,17 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
...
@@ -5605,17 +5608,17 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
switch
(
subframe
)
{
switch
(
subframe
)
{
case
2
:
case
2
:
case
3
:
case
3
:
ret
urn
(
subframe
-
2
);
ret
=
(
subframe
-
2
);
break
;
break
;
case
7
:
case
7
:
case
8
:
case
8
:
ret
urn
(
subframe
-
5
);
ret
=
(
subframe
-
5
);
break
;
break
;
default:
default:
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
ret
urn
(
255
);
ret
=
(
255
);
break
;
break
;
}
}
...
@@ -5625,72 +5628,78 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
...
@@ -5625,72 +5628,78 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame,uint8_t
if
((
subframe
!=
2
)
&&
(
subframe
!=
7
))
{
if
((
subframe
!=
2
)
&&
(
subframe
!=
7
))
{
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
mac_xface
->
macphy_exit
(
"subframe2_harq_pid, Illegal subframe"
);
mac_xface
->
macphy_exit
(
"subframe2_harq_pid, Illegal subframe"
);
ret
urn
(
255
);
ret
=
(
255
);
}
}
ret
urn
(
subframe
/
7
);
ret
=
(
subframe
/
7
);
break
;
break
;
case
3
:
case
3
:
if
((
subframe
<
2
)
||
(
subframe
>
4
))
{
if
((
subframe
<
2
)
||
(
subframe
>
4
))
{
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
ret
urn
(
255
);
ret
=
(
255
);
}
}
ret
urn
(
subframe
-
2
);
ret
=
(
subframe
-
2
);
break
;
break
;
case
4
:
case
4
:
if
((
subframe
<
2
)
||
(
subframe
>
3
))
{
if
((
subframe
<
2
)
||
(
subframe
>
3
))
{
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
ret
urn
(
255
);
ret
=
(
255
);
}
}
ret
urn
(
subframe
-
2
);
ret
=
(
subframe
-
2
);
break
;
break
;
case
5
:
case
5
:
if
(
subframe
!=
2
)
{
if
(
subframe
!=
2
)
{
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
LOG_E
(
PHY
,
"subframe2_harq_pid, Illegal subframe %d for TDD mode %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
ret
urn
(
255
);
ret
=
(
255
);
}
}
ret
urn
(
subframe
-
2
);
ret
=
(
subframe
-
2
);
break
;
break
;
default:
default:
LOG_E
(
PHY
,
"subframe2_harq_pid, Unsupported TDD mode %d
\n
"
,
frame_parms
->
tdd_config
);
LOG_E
(
PHY
,
"subframe2_harq_pid, Unsupported TDD mode %d
\n
"
,
frame_parms
->
tdd_config
);
ret
urn
(
255
);
ret
=
(
255
);
}
}
}
}
return
(
255
);
if
(
ret
==
255
)
{
LOG_E
(
PHY
,
"invalid harq_pid(%d) at SFN/SF = %d/%d
\n
"
,
ret
,
frame
,
subframe
);
mac_xface
->
macphy_exit
(
"invalid harq_pid"
);
}
return
ret
;
}
}
uint8_t
pdcch_alloc2ul_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
n
)
uint8_t
pdcch_alloc2ul_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
n
)
{
{
uint8_t
ul_subframe
=
255
;
if
((
frame_parms
->
frame_type
==
TDD
)
&&
if
((
frame_parms
->
frame_type
==
TDD
)
&&
(
frame_parms
->
tdd_config
==
1
)
&&
(
frame_parms
->
tdd_config
==
1
)
&&
((
n
==
1
)
||
(
n
==
6
)))
// tdd_config 0,1 SF 1,5
((
n
==
1
)
||
(
n
==
6
)))
// tdd_config 0,1 SF 1,5
return
((
n
+
6
)
%
10
);
ul_subframe
=
((
n
+
6
)
%
10
);
else
if
((
frame_parms
->
frame_type
==
TDD
)
&&
else
if
((
frame_parms
->
frame_type
==
TDD
)
&&
(
frame_parms
->
tdd_config
==
6
)
&&
(
frame_parms
->
tdd_config
==
6
)
&&
((
n
==
0
)
||
(
n
==
1
)
||
(
n
==
5
)
||
(
n
==
6
)))
((
n
==
0
)
||
(
n
==
1
)
||
(
n
==
5
)
||
(
n
==
6
)))
return
((
n
+
7
)
%
10
);
ul_subframe
=
((
n
+
7
)
%
10
);
else
if
((
frame_parms
->
frame_type
==
TDD
)
&&
else
if
((
frame_parms
->
frame_type
==
TDD
)
&&
(
frame_parms
->
tdd_config
==
6
)
&&
(
frame_parms
->
tdd_config
==
6
)
&&
(
n
==
9
))
// tdd_config 6 SF 9
(
n
==
9
))
// tdd_config 6 SF 9
return
((
n
+
5
)
%
10
);
ul_subframe
=
((
n
+
5
)
%
10
);
else
else
return
((
n
+
4
)
%
10
);
ul_subframe
=
((
n
+
4
)
%
10
);
LOG_D
(
PHY
,
"subframe %d: PUSCH subframe = %d
\n
"
,
n
,
ul_subframe
);
return
ul_subframe
;
}
}
uint8_t
ul_subframe2pdcch_alloc_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
n
)
uint8_t
ul_subframe2pdcch_alloc_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
n
)
{
{
if
((
frame_parms
->
frame_type
==
TDD
)
&&
if
((
frame_parms
->
frame_type
==
TDD
)
&&
(
frame_parms
->
tdd_config
==
1
)
&&
(
frame_parms
->
tdd_config
==
1
)
&&
((
n
==
7
)
||
(
n
==
2
)))
// tdd_config 0,1 SF 1,5
((
n
==
7
)
||
(
n
==
2
)))
// tdd_config 0,1 SF 1,5
...
@@ -5710,21 +5719,25 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t
...
@@ -5710,21 +5719,25 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t
uint32_t
pdcch_alloc2ul_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint8_t
n
)
uint32_t
pdcch_alloc2ul_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint8_t
n
)
{
{
uint32_t
ul_frame
=
255
;
if
((
frame_parms
->
frame_type
==
TDD
)
&&
if
((
frame_parms
->
frame_type
==
TDD
)
&&
(
frame_parms
->
tdd_config
==
1
)
&&
(
frame_parms
->
tdd_config
==
1
)
&&
((
n
==
1
)
||
(
n
==
6
)))
// tdd_config 0,1 SF 1,5
((
n
==
1
)
||
(
n
==
6
)))
// tdd_config 0,1 SF 1,5
return
(
frame
+
(
n
==
1
?
0
:
1
));
ul_frame
=
(
frame
+
(
n
==
1
?
0
:
1
));
else
if
((
frame_parms
->
frame_type
==
TDD
)
&&
else
if
((
frame_parms
->
frame_type
==
TDD
)
&&
(
frame_parms
->
tdd_config
==
6
)
&&
(
frame_parms
->
tdd_config
==
6
)
&&
((
n
==
0
)
||
(
n
==
1
)
||
(
n
==
5
)
||
(
n
==
6
)))
((
n
==
0
)
||
(
n
==
1
)
||
(
n
==
5
)
||
(
n
==
6
)))
return
(
frame
+
(
n
>=
5
?
1
:
0
));
ul_frame
=
(
frame
+
(
n
>=
5
?
1
:
0
));
else
if
((
frame_parms
->
frame_type
==
TDD
)
&&
else
if
((
frame_parms
->
frame_type
==
TDD
)
&&
(
frame_parms
->
tdd_config
==
6
)
&&
(
frame_parms
->
tdd_config
==
6
)
&&
(
n
==
9
))
// tdd_config 6 SF 9
(
n
==
9
))
// tdd_config 6 SF 9
return
(
frame
+
1
);
ul_frame
=
(
frame
+
1
);
else
else
return
(
frame
+
(
n
>=
6
?
1
:
0
));
ul_frame
=
(
frame
+
(
n
>=
6
?
1
:
0
));
LOG_D
(
PHY
,
"frame %d subframe %d: PUSCH frame = %d
\n
"
,
frame
,
n
,
ul_frame
);
return
ul_frame
;
}
}
...
...
openair1/PHY/LTE_TRANSPORT/phich.c
View file @
d11a22aa
...
@@ -142,125 +142,134 @@ unsigned char subframe2_ul_harq(LTE_DL_FRAME_PARMS *frame_parms,unsigned char su
...
@@ -142,125 +142,134 @@ unsigned char subframe2_ul_harq(LTE_DL_FRAME_PARMS *frame_parms,unsigned char su
uint8_t
phich_frame2_pusch_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
frame_t
frame
,
uint8_t
subframe
)
uint8_t
phich_frame2_pusch_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
frame_t
frame
,
uint8_t
subframe
)
{
{
uint8_t
pusch_frame
=
255
;
if
(
frame_parms
->
frame_type
==
FDD
)
{
if
(
frame_parms
->
frame_type
==
FDD
)
{
return
((
subframe
<
4
)
?
(
frame
-
1
)
:
frame
);
pusch_frame
=
((
subframe
<
4
)
?
(
frame
-
1
)
:
frame
);
}
else
{
}
else
{
// Note this is not true, but it doesn't matter, the frame number is irrelevant for TDD!
// Note this is not true, but it doesn't matter, the frame number is irrelevant for TDD!
return
(
frame
);
pusch_frame
=
(
frame
);
}
}
LOG_D
(
PHY
,
"frame %d subframe %d: PUSCH frame = %d
\n
"
,
frame
,
subframe
,
pusch_frame
);
return
pusch_frame
;
}
}
uint8_t
phich_subframe2_pusch_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
)
uint8_t
phich_subframe2_pusch_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
)
{
{
uint8_t
pusch_subframe
=
255
;
if
(
frame_parms
->
frame_type
==
FDD
)
if
(
frame_parms
->
frame_type
==
FDD
)
return
(
subframe
<
4
?
(
subframe
+
6
)
:
(
subframe
-
4
));
pusch_subframe
=
(
subframe
<
4
?
(
subframe
+
6
)
:
(
subframe
-
4
));
switch
(
frame_parms
->
tdd_config
)
{
switch
(
frame_parms
->
tdd_config
)
{
case
0
:
case
0
:
if
(
subframe
==
0
)
if
(
subframe
==
0
)
return
(
3
);
pusch_subframe
=
(
3
);
else
if
(
subframe
==
5
)
{
else
if
(
subframe
==
5
)
{
return
(
8
);
pusch_subframe
=
(
8
);
}
else
if
(
subframe
==
6
)
}
else
if
(
subframe
==
6
)
return
(
2
);
pusch_subframe
=
(
2
);
else
if
(
subframe
==
1
)
else
if
(
subframe
==
1
)
return
(
7
);
pusch_subframe
=
(
7
);
else
{
else
{
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
subframe
,
frame_parms
->
tdd_config
);
return
(
0
);
pusch_subframe
=
(
0
);
}
}
break
;
break
;
case
1
:
case
1
:
if
(
subframe
==
6
)
if
(
subframe
==
6
)
return
(
2
);
pusch_subframe
=
(
2
);
else
if
(
subframe
==
9
)
else
if
(
subframe
==
9
)
return
(
3
);
pusch_subframe
=
(
3
);
else
if
(
subframe
==
1
)
else
if
(
subframe
==
1
)
return
(
7
);
pusch_subframe
=
(
7
);
else
if
(
subframe
==
4
)
else
if
(
subframe
==
4
)
return
(
8
);
pusch_subframe
=
(
8
);
else
{
else
{
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
subframe
,
frame_parms
->
tdd_config
);
return
(
0
);
pusch_subframe
=
(
0
);
}
}
break
;
break
;
case
2
:
case
2
:
if
(
subframe
==
8
)
if
(
subframe
==
8
)
return
(
2
);
pusch_subframe
=
(
2
);
else
if
(
subframe
==
3
)
else
if
(
subframe
==
3
)
return
(
7
);
pusch_subframe
=
(
7
);
else
{
else
{
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
subframe
,
frame_parms
->
tdd_config
);
return
(
0
);
pusch_subframe
=
(
0
);
}
}
break
;
break
;
case
3
:
case
3
:
if
(
(
subframe
==
8
)
||
(
subframe
==
9
)
)
{
if
(
(
subframe
==
8
)
||
(
subframe
==
9
)
)
{
return
(
subframe
-
6
);
pusch_subframe
=
(
subframe
-
6
);
}
else
if
(
subframe
==
0
)
}
else
if
(
subframe
==
0
)
return
(
4
);
pusch_subframe
=
(
4
);
else
{
else
{
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
subframe
,
frame_parms
->
tdd_config
);
return
(
0
);
pusch_subframe
=
(
0
);
}
}
break
;
break
;
case
4
:
case
4
:
if
(
(
subframe
==
8
)
||
(
subframe
==
9
)
)
{
if
(
(
subframe
==
8
)
||
(
subframe
==
9
)
)
{
return
(
subframe
-
6
);
pusch_subframe
=
(
subframe
-
6
);
}
else
{
}
else
{
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
subframe
,
frame_parms
->
tdd_config
);
return
(
0
);
pusch_subframe
=
(
0
);
}
}
break
;
break
;
case
5
:
case
5
:
if
(
subframe
==
8
)
{
if
(
subframe
==
8
)
{
return
(
2
);
pusch_subframe
=
(
2
);
}
else
{
}
else
{
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
subframe
,
frame_parms
->
tdd_config
);
return
(
0
);
pusch_subframe
=
(
0
);
}
}
break
;
break
;
case
6
:
case
6
:
if
(
subframe
==
6
)
{
if
(
subframe
==
6
)
{
return
(
2
);
pusch_subframe
=
(
2
);
}
else
if
(
subframe
==
9
)
{
}
else
if
(
subframe
==
9
)
{
return
(
3
);
pusch_subframe
=
(
3
);
}
else
if
(
subframe
==
0
)
{
}
else
if
(
subframe
==
0
)
{
return
(
4
);
pusch_subframe
=
(
4
);
}
else
if
(
subframe
==
1
)
{
}
else
if
(
subframe
==
1
)
{
return
(
7
);
pusch_subframe
=
(
7
);
}
else
if
(
subframe
==
5
)
{
}
else
if
(
subframe
==
5
)
{
return
(
8
);
pusch_subframe
=
(
8
);
}
else
{
}
else
{
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
LOG_E
(
PHY
,
"phich.c: phich_subframe2_pusch_subframe, illegal subframe %d for tdd_config %d
\n
"
,
subframe
,
frame_parms
->
tdd_config
);
subframe
,
frame_parms
->
tdd_config
);
return
(
0
);
pusch_subframe
=
(
0
);
}
}
break
;
break
;
default:
LOG_E
(
PHY
,
"no implementation for TDD UL/DL-config = %d!
\n
"
,
frame_parms
->
tdd_config
);
pusch_subframe
=
(
0
);
}
}
return
(
0
);
LOG_D
(
PHY
,
"subframe %d: PUSCH subframe = %d
\n
"
,
subframe
,
pusch_subframe
);
return
pusch_subframe
;
}
}
int
check_pcfich
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
reg
)
int
check_pcfich
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
reg
)
...
...
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