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
b78c96cb
Commit
b78c96cb
authored
Nov 22, 2017
by
Vincent Savaux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt decoding to BPSK 1 subcarrier
parent
d8fcc7c3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
23 deletions
+46
-23
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation_NB_IoT.c
...ir1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation_NB_IoT.c
+6
-5
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
+9
-1
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
+31
-17
No files found.
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation_NB_IoT.c
View file @
b78c96cb
...
...
@@ -50,15 +50,15 @@ static int16_t temp_out_ifft_0[2048*4] __attribute__((aligned(16)));
static int16_t temp_out_ifft_1[2048*4] __attribute__((aligned(16)));
*/
static
int32_t
temp_in_ifft_0
[
2048
*
2
]
__attribute__
((
aligned
(
32
)));
//
static int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
//static int32_t temp_in_ifft_1[2048*2] __attribute__((aligned(32)));
//static int32_t temp_in_fft_0[2048*2] __attribute__((aligned(16)));
static
int32_t
temp_in_fft_1
[
2048
*
2
]
__attribute__
((
aligned
(
16
)));
//
static int32_t temp_in_fft_1[2048*2] __attribute__((aligned(16)));
// round(exp(sqrt(-1)*(pi/2)*[0:1:N-1]/N)*pow2(15))
static
int16_t
ru_90
[
2
*
128
]
=
{
32767
,
0
,
32766
,
402
,
32758
,
804
,
32746
,
1206
,
32729
,
1608
,
32706
,
2009
,
32679
,
2411
,
32647
,
2811
,
32610
,
3212
,
32568
,
3612
,
32522
,
4011
,
32470
,
4410
,
32413
,
4808
,
32352
,
5205
,
32286
,
5602
,
32214
,
5998
,
32138
,
6393
,
32058
,
6787
,
31972
,
7180
,
31881
,
7571
,
31786
,
7962
,
31686
,
8351
,
31581
,
8740
,
31471
,
9127
,
31357
,
9512
,
31238
,
9896
,
31114
,
10279
,
30986
,
10660
,
30853
,
11039
,
30715
,
11417
,
30572
,
11793
,
30425
,
12167
,
30274
,
12540
,
30118
,
12910
,
29957
,
13279
,
29792
,
13646
,
29622
,
14010
,
29448
,
14373
,
29269
,
14733
,
29086
,
15091
,
28899
,
15447
,
28707
,
15800
,
28511
,
16151
,
28311
,
16500
,
28106
,
16846
,
27897
,
17190
,
27684
,
17531
,
27467
,
17869
,
27246
,
18205
,
27020
,
18538
,
26791
,
18868
,
26557
,
19195
,
26320
,
19520
,
26078
,
19841
,
25833
,
20160
,
25583
,
20475
,
25330
,
20788
,
25073
,
21097
,
24812
,
21403
,
24548
,
21706
,
24279
,
22006
,
24008
,
22302
,
23732
,
22595
,
23453
,
22884
,
23170
,
23170
,
22884
,
23453
,
22595
,
23732
,
22302
,
24008
,
22006
,
24279
,
21706
,
24548
,
21403
,
24812
,
21097
,
25073
,
20788
,
25330
,
20475
,
25583
,
20160
,
25833
,
19841
,
26078
,
19520
,
26320
,
19195
,
26557
,
18868
,
26791
,
18538
,
27020
,
18205
,
27246
,
17869
,
27467
,
17531
,
27684
,
17190
,
27897
,
16846
,
28106
,
16500
,
28311
,
16151
,
28511
,
15800
,
28707
,
15447
,
28899
,
15091
,
29086
,
14733
,
29269
,
14373
,
29448
,
14010
,
29622
,
13646
,
29792
,
13279
,
29957
,
12910
,
30118
,
12540
,
30274
,
12167
,
30425
,
11793
,
30572
,
11417
,
30715
,
11039
,
30853
,
10660
,
30986
,
10279
,
31114
,
9896
,
31238
,
9512
,
31357
,
9127
,
31471
,
8740
,
31581
,
8351
,
31686
,
7962
,
31786
,
7571
,
31881
,
7180
,
31972
,
6787
,
32058
,
6393
,
32138
,
5998
,
32214
,
5602
,
32286
,
5205
,
32352
,
4808
,
32413
,
4410
,
32470
,
4011
,
32522
,
3612
,
32568
,
3212
,
32610
,
2811
,
32647
,
2411
,
32679
,
2009
,
32706
,
1608
,
32729
,
1206
,
32746
,
804
,
32758
,
402
,
32766
};
//
static int16_t ru_90[2*128] = {32767, 0,32766, 402,32758, 804,32746, 1206,32729, 1608,32706, 2009,32679, 2411,32647, 2811,32610, 3212,32568, 3612,32522, 4011,32470, 4410,32413, 4808,32352, 5205,32286, 5602,32214, 5998,32138, 6393,32058, 6787,31972, 7180,31881, 7571,31786, 7962,31686, 8351,31581, 8740,31471, 9127,31357, 9512,31238, 9896,31114, 10279,30986, 10660,30853, 11039,30715, 11417,30572, 11793,30425, 12167,30274, 12540,30118, 12910,29957, 13279,29792, 13646,29622, 14010,29448, 14373,29269, 14733,29086, 15091,28899, 15447,28707, 15800,28511, 16151,28311, 16500,28106, 16846,27897, 17190,27684, 17531,27467, 17869,27246, 18205,27020, 18538,26791, 18868,26557, 19195,26320, 19520,26078, 19841,25833, 20160,25583, 20475,25330, 20788,25073, 21097,24812, 21403,24548, 21706,24279, 22006,24008, 22302,23732, 22595,23453, 22884,23170, 23170,22884, 23453,22595, 23732,22302, 24008,22006, 24279,21706, 24548,21403, 24812,21097, 25073,20788, 25330,20475, 25583,20160, 25833,19841, 26078,19520, 26320,19195, 26557,18868, 26791,18538, 27020,18205, 27246,17869, 27467,17531, 27684,17190, 27897,16846, 28106,16500, 28311,16151, 28511,15800, 28707,15447, 28899,15091, 29086,14733, 29269,14373, 29448,14010, 29622,13646, 29792,13279, 29957,12910, 30118,12540, 30274,12167, 30425,11793, 30572,11417, 30715,11039, 30853,10660, 30986,10279, 31114,9896, 31238,9512, 31357,9127, 31471,8740, 31581,8351, 31686,7962, 31786,7571, 31881,7180, 31972,6787, 32058,6393, 32138,5998, 32214,5602, 32286,5205, 32352,4808, 32413,4410, 32470,4011, 32522,3612, 32568,3212, 32610,2811, 32647,2411, 32679,2009, 32706,1608, 32729,1206, 32746,804, 32758,402, 32766};
static
int16_t
ru_90c
[
2
*
128
]
=
{
32767
,
0
,
32766
,
-
402
,
32758
,
-
804
,
32746
,
-
1206
,
32729
,
-
1608
,
32706
,
-
2009
,
32679
,
-
2411
,
32647
,
-
2811
,
32610
,
-
3212
,
32568
,
-
3612
,
32522
,
-
4011
,
32470
,
-
4410
,
32413
,
-
4808
,
32352
,
-
5205
,
32286
,
-
5602
,
32214
,
-
5998
,
32138
,
-
6393
,
32058
,
-
6787
,
31972
,
-
7180
,
31881
,
-
7571
,
31786
,
-
7962
,
31686
,
-
8351
,
31581
,
-
8740
,
31471
,
-
9127
,
31357
,
-
9512
,
31238
,
-
9896
,
31114
,
-
10279
,
30986
,
-
10660
,
30853
,
-
11039
,
30715
,
-
11417
,
30572
,
-
11793
,
30425
,
-
12167
,
30274
,
-
12540
,
30118
,
-
12910
,
29957
,
-
13279
,
29792
,
-
13646
,
29622
,
-
14010
,
29448
,
-
14373
,
29269
,
-
14733
,
29086
,
-
15091
,
28899
,
-
15447
,
28707
,
-
15800
,
28511
,
-
16151
,
28311
,
-
16500
,
28106
,
-
16846
,
27897
,
-
17190
,
27684
,
-
17531
,
27467
,
-
17869
,
27246
,
-
18205
,
27020
,
-
18538
,
26791
,
-
18868
,
26557
,
-
19195
,
26320
,
-
19520
,
26078
,
-
19841
,
25833
,
-
20160
,
25583
,
-
20475
,
25330
,
-
20788
,
25073
,
-
21097
,
24812
,
-
21403
,
24548
,
-
21706
,
24279
,
-
22006
,
24008
,
-
22302
,
23732
,
-
22595
,
23453
,
-
22884
,
23170
,
-
23170
,
22884
,
-
23453
,
22595
,
-
23732
,
22302
,
-
24008
,
22006
,
-
24279
,
21706
,
-
24548
,
21403
,
-
24812
,
21097
,
-
25073
,
20788
,
-
25330
,
20475
,
-
25583
,
20160
,
-
25833
,
19841
,
-
26078
,
19520
,
-
26320
,
19195
,
-
26557
,
18868
,
-
26791
,
18538
,
-
27020
,
18205
,
-
27246
,
17869
,
-
27467
,
17531
,
-
27684
,
17190
,
-
27897
,
16846
,
-
28106
,
16500
,
-
28311
,
16151
,
-
28511
,
15800
,
-
28707
,
15447
,
-
28899
,
15091
,
-
29086
,
14733
,
-
29269
,
14373
,
-
29448
,
14010
,
-
29622
,
13646
,
-
29792
,
13279
,
-
29957
,
12910
,
-
30118
,
12540
,
-
30274
,
12167
,
-
30425
,
11793
,
-
30572
,
11417
,
-
30715
,
11039
,
-
30853
,
10660
,
-
30986
,
10279
,
-
31114
,
9896
,
-
31238
,
9512
,
-
31357
,
9127
,
-
31471
,
8740
,
-
31581
,
8351
,
-
31686
,
7962
,
-
31786
,
7571
,
-
31881
,
7180
,
-
31972
,
6787
,
-
32058
,
6393
,
-
32138
,
5998
,
-
32214
,
5602
,
-
32286
,
5205
,
-
32352
,
4808
,
-
32413
,
4410
,
-
32470
,
4011
,
-
32522
,
3612
,
-
32568
,
3212
,
-
32610
,
2811
,
-
32647
,
2411
,
-
32679
,
2009
,
-
32706
,
1608
,
-
32729
,
1206
,
-
32746
,
804
,
-
32758
,
402
,
-
32766
};
//
static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32729, -1608,32706, -2009,32679, -2411,32647, -2811,32610, -3212,32568, -3612,32522, -4011,32470, -4410,32413, -4808,32352, -5205,32286, -5602,32214, -5998,32138, -6393,32058, -6787,31972, -7180,31881, -7571,31786, -7962,31686, -8351,31581, -8740,31471, -9127,31357, -9512,31238, -9896,31114, -10279,30986, -10660,30853, -11039,30715, -11417,30572, -11793,30425, -12167,30274, -12540,30118, -12910,29957, -13279,29792, -13646,29622, -14010,29448, -14373,29269, -14733,29086, -15091,28899, -15447,28707, -15800,28511, -16151,28311, -16500,28106, -16846,27897, -17190,27684, -17531,27467, -17869,27246, -18205,27020, -18538,26791, -18868,26557, -19195,26320, -19520,26078, -19841,25833, -20160,25583, -20475,25330, -20788,25073, -21097,24812, -21403,24548, -21706,24279, -22006,24008, -22302,23732, -22595,23453, -22884,23170, -23170,22884, -23453,22595, -23732,22302, -24008,22006, -24279,21706, -24548,21403, -24812,21097, -25073,20788, -25330,20475, -25583,20160, -25833,19841, -26078,19520, -26320,19195, -26557,18868, -26791,18538, -27020,18205, -27246,17869, -27467,17531, -27684,17190, -27897,16846, -28106,16500, -28311,16151, -28511,15800, -28707,15447, -28899,15091, -29086,14733, -29269,14373, -29448,14010, -29622,13646, -29792,13279, -29957,12910, -30118,12540, -30274,12167, -30425,11793, -30572,11417, -30715,11039, -30853,10660, -30986,10279, -31114,9896, -31238,9512, -31357,9127, -31471,8740, -31581,8351, -31686,7962, -31786,7571, -31881,7180, -31972,6787, -32058,6393, -32138,5998, -32214,5602, -32286,5205, -32352,4808, -32413,4410, -32470,4011, -32522,3612, -32568,3212, -32610,2811, -32647,2411, -32679,2009, -32706,1608, -32729,1206, -32746,804, -32758,402, -32766};
#define SCALE 0x3FFF
...
...
@@ -144,7 +144,7 @@ int32_t ul_channel_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
uint8_t
threetnecyclicshift
=
0
,
sixtonecyclichift
=
0
;
// NB-IoT: to be defined from higher layer, see 36.211 Section 10.1.4.1.2
uint8_t
actual_cyclicshift
;
uint8_t
Nsc_RU
=
eNB
->
ulsch
[
UE_id
]
->
harq_process
->
N_sc_RU
;
// Vincent: number of sc 1,3,6,12
unsigned
int
index_Nsc_RU
;
// Vincent: index_Nsc_RU 0,1,2,3 ---> number of sc 1,3,6,12
unsigned
int
index_Nsc_RU
=
4
;
// Vincent: index_Nsc_RU 0,1,2,3 ---> number of sc 1,3,6,12
int16_t
*
received_data
,
*
estimated_channel
,
*
pilot_sig
;
// pointers to
uint8_t
npusch_format
=
1
;
// NB-IoT: format 1 (data), or 2: ack. Should be defined in higher layer
...
...
@@ -355,6 +355,7 @@ int32_t ul_channel_estimation_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
break
;
}
return
(
0
);
}
...
...
openair1/PHY/LTE_TRANSPORT/defs_NB_IoT.h
View file @
b78c96cb
...
...
@@ -41,7 +41,7 @@
//// maximum of 3 segments before each coding block if data length exceeds 6144 bits.
//
#define MAX_NUM_DLSCH_SEGMENTS_NB_IoT 16
//#define MAX_NUM_ULSCH_SEGMENTS MAX_NUM_DLSCH_SEGMENTS
#define MAX_NUM_ULSCH_SEGMENTS_NB_IoT MAX_NUM_DLSCH_SEGMENTS_NB_IoT
//#define MAX_DLSCH_PAYLOAD_BYTES (MAX_NUM_DLSCH_SEGMENTS*768)
//#define MAX_ULSCH_PAYLOAD_BYTES (MAX_NUM_ULSCH_SEGMENTS*768)
//
...
...
@@ -648,6 +648,10 @@ typedef struct {
int8_t
o_w
[(
MAX_CQI_BITS_NB_IoT
+
8
)
*
3
];
/// coded CQI bits
int8_t
o_d
[
96
+
((
MAX_CQI_BITS_NB_IoT
+
8
)
*
3
)];
/// soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
int16_t
w
[
MAX_NUM_ULSCH_SEGMENTS_NB_IoT
][
3
*
(
6144
+
64
)];
/// soft bits for each received segment ("d"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
int16_t
*
d
[
MAX_NUM_ULSCH_SEGMENTS_NB_IoT
];
///
uint32_t
C
;
/// Number of "small" code segments (for definition see 36-212 V8.6 2009-03, p.10)
...
...
@@ -666,6 +670,10 @@ typedef struct {
uint8_t
srs_active
;
/// Pointer to the payload
uint8_t
*
b
;
/// Pointers to transport block segments
uint8_t
*
c
[
MAX_NUM_ULSCH_SEGMENTS_NB_IoT
];
/// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15)
uint32_t
RTC
[
MAX_NUM_ULSCH_SEGMENTS_NB_IoT
];
/// Current Number of Symbols
uint8_t
Nsymb_pusch
;
/// Index of current HARQ round for this ULSCH
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding_NB_IoT.c
View file @
b78c96cb
...
...
@@ -29,7 +29,16 @@
* \note
* \warning
*/
/*! \file PHY/LTE_TRANSPORT/ulsch_decoding.c
* \brief Top-level routines for decoding the ULSCH transport channel from 36.212 V8.6 2009-03
* \author V. Savaux
* \date 2017
* \version 0.1
* \company b<>com
* \email: vincent.savaux@b-com.com
* \note
* \warning
*/
//#include "defs.h"
//#include "PHY/defs.h"
...
...
@@ -37,7 +46,7 @@
#include "PHY/extern_NB_IoT.h"
#include "PHY/LTE_TRANSPORT/vars_NB_IoT.h"
#include "PHY/CODING/defs_NB_IoT.h"
//
#include "PHY/CODING/extern.h"
#include "PHY/CODING/extern.h"
//#include "extern_NB_IoT.h"
//#include "SCHED/extern.h"
/*
...
...
@@ -734,7 +743,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
}
*/
/*
// NB_IoT: functions in ulsch_decoding_data_NB_IoT must be defined
int
ulsch_decoding_data_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
)
{
...
...
@@ -743,9 +752,10 @@ int ulsch_decoding_data_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,int UE_id,int harq_pid,i
uint8_t
crc_type
;
int
offset
=
0
;
int
ret
=
1
;
int16_t dummy_w[MAX_NUM_ULSCH_SEGMENTS][3*(6144+64)];
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
int16_t
dummy_w
[
MAX_NUM_ULSCH_SEGMENTS_NB_IoT
][
3
*
(
6144
+
64
)];
NB_IoT_eNB_NULSCH_t
*
ulsch
=
eNB
->
ulsch
[
UE_id
];
// NB_IoT_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_process[harq_pid];
NB_IoT_UL_eNB_HARQ_t
*
ulsch_harq
=
ulsch
->
harq_process
;
//int Q_m = get_Qm_ul(ulsch_harq->mcs);
int
G
=
ulsch_harq
->
G
;
unsigned
int
E
;
...
...
@@ -758,13 +768,13 @@ int ulsch_decoding_data_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,int UE_id,int harq_pid,i
uint8_t
,
uint8_t
,
uint8_t
,
time_stats_t *,
time_stats_t *,
time_stats_t *,
time_stats_t *,
time_stats_t *,
time_stats_t *,
time_stats_t *);
time_stats_t
_NB_IoT
*
,
time_stats_t
_NB_IoT
*
,
time_stats_t
_NB_IoT
*
,
time_stats_t
_NB_IoT
*
,
time_stats_t
_NB_IoT
*
,
time_stats_t
_NB_IoT
*
,
time_stats_t
_NB_IoT
*
);
if
(
llr8_flag
==
0
)
tc
=
phy_threegpplte_turbo_decoder16
;
...
...
@@ -900,7 +910,7 @@ int ulsch_decoding_data_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,int UE_id,int harq_pid,i
return
(
ret
);
}
*/
// NB_IoT: functions in ulsch_decoding_data_NB_IoT must be defined :ulsch_decoding_data_NB_IoT (defined in this file)
...
...
@@ -1006,7 +1016,7 @@ unsigned int ulsch_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
A
=
ulsch_harq
->
TBS
;
Q_m
=
get_Qm_ul_NB_IoT
(
ulsch_harq
->
mcs
,
ulsch_harq
->
N_sc_RU
);
//G = nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch;
G
=
(
ulsch_harq
->
N_sc_RU
*
Q_m
)
*
ulsch_harq
->
Nsymb_UL
*
ulsch_harq
->
Nslot_UL
;
G
=
(
ulsch_harq
->
N_sc_RU
*
Q_m
)
*
ulsch_harq
->
Nsymb_UL
*
ulsch_harq
->
Nslot_UL
;
// see 36.212, Section 5.1.4.1.2
#ifdef DEBUG_ULSCH_DECODING
printf
(
"ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d, subframe %d
\n
"
,
...
...
@@ -1145,7 +1155,9 @@ unsigned int ulsch_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
// Cmux = ulsch_harq->Nsymb_pusch;
// unsigned int Nsymb_UL, Nslot_UL; // NB_IoT: these parameters should included in ulsch_harq
// Cmux = (Nsymb_UL-1)*Nslot_UL;
Cmux
=
(
ulsch_harq
->
Nsymb_UL
-
1
)
*
ulsch_harq
->
Nslot_UL
;
// Cmux = (ulsch_harq->Nsymb_UL-1)*ulsch_harq->Nslot_UL; // see definition in 36.212, Section 6.3.2, but not consistent with definition
// of RU in 36.211, Section 10.1.2.3. Maybe prefer the following:
Cmux
=
(
ulsch_harq
->
Nsymb_UL
)
*
ulsch_harq
->
Nslot_UL
;
Rmux_prime
=
Hpp
/
Cmux
;
...
...
@@ -1247,8 +1259,10 @@ unsigned int ulsch_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
switch
(
Q_m
)
{
// why the case 1 ??????????????????
case
1
:
for
(
j
=
0
;
j
<
Cmux
;
j
++
)
{
y
[
j
]
=
cseq
[
j
]
*
ulsch_llr
[
j
];
}
break
;
case
2
:
for
(
j
=
0
;
j
<
Cmux
;
j
++
)
{
...
...
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