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
lizhongxiao
OpenXG-RAN
Commits
ec10bea0
Commit
ec10bea0
authored
Oct 21, 2019
by
chenhsunyang0922
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compile error
parent
cca638e2
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
315 additions
and
27 deletions
+315
-27
openair1/PHY/CODING/NB_IoT_interleaver.h
openair1/PHY/CODING/NB_IoT_interleaver.h
+210
-0
openair1/PHY/CODING/extern_NB_IoT.h
openair1/PHY/CODING/extern_NB_IoT.h
+2
-2
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+5
-4
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
+11
-0
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+1
-2
openair1/PHY/NBIoT_TRANSPORT/ulsch_decoding_NB_IoT.c
openair1/PHY/NBIoT_TRANSPORT/ulsch_decoding_NB_IoT.c
+5
-3
openair1/PHY/NBIoT_TRANSPORT/ulsch_demodulation_NB_IoT.c
openair1/PHY/NBIoT_TRANSPORT/ulsch_demodulation_NB_IoT.c
+3
-2
openair1/PHY/defs_L1_NB_IoT.h
openair1/PHY/defs_L1_NB_IoT.h
+1
-1
openair1/SCHED_NBIOT/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED_NBIOT/phy_procedures_lte_eNb_NB_IoT.c
+1
-1
openair2/ENB_APP/flexran_agent_extern.h
openair2/ENB_APP/flexran_agent_extern.h
+1
-0
openair2/LAYER2/MAC/defs_NB_IoT.h
openair2/LAYER2/MAC/defs_NB_IoT.h
+1
-10
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
+4
-0
targets/RT/USER/lte-enb-nbiot.c
targets/RT/USER/lte-enb-nbiot.c
+70
-2
No files found.
openair1/PHY/CODING/NB_IoT_interleaver.h
0 → 100644
View file @
ec10bea0
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
unsigned
short
f1f2mat_old
[
2
*
188
]
=
{
3
,
10
,
7
,
12
,
19
,
42
,
7
,
16
,
7
,
18
,
11
,
20
,
5
,
22
,
11
,
24
,
7
,
26
,
41
,
84
,
103
,
90
,
15
,
32
,
9
,
34
,
17
,
108
,
9
,
38
,
21
,
120
,
101
,
84
,
21
,
44
,
57
,
46
,
23
,
48
,
13
,
50
,
27
,
52
,
11
,
36
,
27
,
56
,
85
,
58
,
29
,
60
,
33
,
62
,
15
,
32
,
17
,
198
,
33
,
68
,
103
,
210
,
19
,
36
,
19
,
74
,
37
,
76
,
19
,
78
,
21
,
120
,
21
,
82
,
115
,
84
,
193
,
86
,
21
,
44
,
133
,
90
,
81
,
46
,
45
,
94
,
23
,
48
,
243
,
98
,
151
,
40
,
155
,
102
,
25
,
52
,
51
,
106
,
47
,
72
,
91
,
110
,
29
,
168
,
29
,
114
,
247
,
58
,
29
,
118
,
89
,
180
,
91
,
122
,
157
,
62
,
55
,
84
,
31
,
64
,
17
,
66
,
35
,
68
,
227
,
420
,
65
,
96
,
19
,
74
,
37
,
76
,
41
,
234
,
39
,
80
,
185
,
82
,
43
,
252
,
21
,
86
,
155
,
44
,
79
,
120
,
139
,
92
,
23
,
94
,
217
,
48
,
25
,
98
,
17
,
80
,
127
,
102
,
25
,
52
,
239
,
106
,
17
,
48
,
137
,
110
,
215
,
112
,
29
,
114
,
15
,
58
,
147
,
118
,
29
,
60
,
59
,
122
,
65
,
124
,
55
,
84
,
31
,
64
,
17
,
66
,
171
,
204
,
67
,
140
,
35
,
72
,
19
,
74
,
39
,
76
,
19
,
78
,
199
,
240
,
21
,
82
,
211
,
252
,
21
,
86
,
43
,
88
,
149
,
60
,
45
,
92
,
49
,
846
,
71
,
48
,
13
,
28
,
17
,
80
,
25
,
102
,
183
,
104
,
55
,
954
,
127
,
96
,
27
,
110
,
29
,
112
,
29
,
114
,
57
,
116
,
45
,
354
,
31
,
120
,
59
,
610
,
185
,
124
,
113
,
420
,
31
,
64
,
17
,
66
,
171
,
136
,
209
,
420
,
253
,
216
,
367
,
444
,
265
,
456
,
181
,
468
,
39
,
80
,
27
,
164
,
127
,
504
,
143
,
172
,
43
,
88
,
29
,
300
,
45
,
92
,
157
,
188
,
47
,
96
,
13
,
28
,
111
,
240
,
443
,
204
,
51
,
104
,
51
,
212
,
451
,
192
,
257
,
220
,
57
,
336
,
313
,
228
,
271
,
232
,
179
,
236
,
331
,
120
,
363
,
244
,
375
,
248
,
127
,
168
,
31
,
64
,
33
,
130
,
43
,
264
,
33
,
134
,
477
,
408
,
35
,
138
,
233
,
280
,
357
,
142
,
337
,
480
,
37
,
146
,
71
,
444
,
71
,
120
,
37
,
152
,
39
,
462
,
127
,
234
,
39
,
158
,
39
,
80
,
31
,
96
,
113
,
902
,
41
,
166
,
251
,
336
,
43
,
170
,
21
,
86
,
43
,
174
,
45
,
176
,
45
,
178
,
161
,
120
,
89
,
182
,
323
,
184
,
47
,
186
,
23
,
94
,
47
,
190
,
263
,
480
};
\ No newline at end of file
openair1/PHY/CODING/extern_NB_IoT.h
View file @
ec10bea0
...
...
@@ -18,7 +18,7 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*
unsigned short f1f2mat_old[2*188] = {3, 10,
7, 12,
19, 42,
...
...
@@ -208,5 +208,5 @@ unsigned short f1f2mat_old[2*188] = {3, 10,
47, 190,
263, 480
};
*/
extern
unsigned
short
f1f2mat_old
[
2
*
188
];
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
ec10bea0
...
...
@@ -385,7 +385,7 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch) {
}
}
/*
int
dlsch_encoding_2threads0
(
te_params
*
tep
)
{
...
...
@@ -456,6 +456,7 @@ int dlsch_encoding_2threads0(te_params *tep) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING_W
,
VCD_FUNCTION_OUT
);
return
(
0
);
}
}
extern
int
oai_exit
;
...
...
@@ -484,15 +485,15 @@ void *te_thread(void *param) {
return
(
NULL
);
}
if(opp_enabled == 1 && te_wakeup_stats0->p_time>50*3000){
/*
if(opp_enabled == 1 && te_wakeup_stats0->p_time>50*3000){
print_meas_now(te_wakeup_stats0,"coding_wakeup",stderr);
printf("te_thread0 delay for waking up in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}
}
*/
}
return
(
NULL
);
}
*/
int
dlsch_encoding_2threads
(
PHY_VARS_eNB
*
eNB
,
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
View file @
ec10bea0
...
...
@@ -233,4 +233,15 @@ void init_unscrambling_lut(void) {
}
}
void
init_scrambling_lut
()
{
uint32_t
s
;
int
i
=
0
,
j
;
for
(
s
=
0
;
s
<=
65535
;
s
++
)
{
for
(
j
=
0
;
j
<
16
;
j
++
)
{
scrambling_lut
[
i
++
]
=
(
uint8_t
)((
s
>>
j
)
&
1
);
}
}
}
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
ec10bea0
...
...
@@ -294,7 +294,6 @@ uint8_t extract_cqi_crc(uint8_t *cqi,uint8_t CQI_LENGTH) {
/*
int
ulsch_decoding_data_2thread0
(
td_params
*
tdp
)
{
PHY_VARS_eNB
*
eNB
=
tdp
->
eNB
;
int
UE_id
=
tdp
->
UE_id
;
...
...
@@ -626,7 +625,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
wait_on_busy_condition
(
&
proc
->
mutex_td
,
&
proc
->
cond_td
,
&
proc
->
instance_cnt_td
,
"td thread"
);
return
(
(
ret
>
proc
->
tdp
.
ret
)
?
ret
:
proc
->
tdp
.
ret
);
}
*/
int
ulsch_decoding_data
(
PHY_VARS_eNB
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
)
{
unsigned
int
r
,
r_offset
=
0
,
Kr
,
Kr_bytes
;
...
...
openair1/PHY/NBIoT_TRANSPORT/ulsch_decoding_NB_IoT.c
View file @
ec10bea0
...
...
@@ -47,6 +47,7 @@
#include "PHY/NBIoT_TRANSPORT/vars_NB_IoT.h"
#include "PHY/CODING/defs_NB_IoT.h"
#include "PHY/CODING/extern_NB_IoT.h"
#include "PHY/CODING/NB_IoT_interleaver.h"
//#include "extern_NB_IoT.h"
//#include "SCHED/extern.h"
/*
...
...
@@ -65,7 +66,8 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
//#define DEBUG_ULSCH_DECODING
decoder_if_t
*
decoder16
;
decoder_if_t
*
decoder8
;
/////////////////////////////////////////////////// NB-IoT testing ////////////////////////////////////////
void
free_eNB_ulsch_NB_IoT
(
NB_IoT_eNB_NULSCH_t
*
ulsch
)
{
...
...
@@ -952,9 +954,9 @@ int ulsch_decoding_data_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,int UE_id,int harq_pid,i
time_stats_t
*
);
if
(
llr8_flag
==
0
)
tc
=
phy_threegpplte_turbo_
decoder16
;
tc
=
decoder16
;
else
tc
=
phy_threegpplte_turbo_
decoder8
;
tc
=
decoder8
;
for
(
r
=
0
;
r
<
ulsch_harq
->
C
;
r
++
)
{
...
...
openair1/PHY/NBIoT_TRANSPORT/ulsch_demodulation_NB_IoT.c
View file @
ec10bea0
...
...
@@ -36,6 +36,7 @@
#include "extern_NB_IoT.h"
//#include "PHY/CODING/lte_interleaver2.h"
#include "PHY/CODING/extern_NB_IoT.h"
#include "PHY/CODING/coding_defs.h"
//#define DEBUG_ULSCH
//#include "PHY/sse_intrin.h"
#include "PHY/LTE_ESTIMATION/defs_NB_IoT.h"
...
...
@@ -49,7 +50,7 @@
//eren
//extern int **ulchmag_eren;
//eren
decoder_if_t
*
decoder16
;
static
short
jitter
[
8
]
__attribute__
((
aligned
(
16
)))
=
{
1
,
0
,
0
,
1
,
0
,
1
,
1
,
0
};
static
short
jitterc
[
8
]
__attribute__
((
aligned
(
16
)))
=
{
0
,
1
,
1
,
0
,
1
,
0
,
0
,
1
};
...
...
@@ -1540,7 +1541,7 @@ uint32_t turbo_decoding_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,
time_stats_t
*
,
time_stats_t
*
);
tc
=
phy_threegpplte_turbo_
decoder16
;
tc
=
decoder16
;
for
(
r
=
0
;
r
<
ulsch_harq
->
C
;
r
++
)
{
...
...
openair1/PHY/defs_L1_NB_IoT.h
View file @
ec10bea0
...
...
@@ -118,7 +118,7 @@ static inline void* malloc16_clear( size_t size )
// #define cmax3(a,b,c) ((cmax(a,b)>c) ? (cmax(a,b)) : (c))
// /// suppress compiler warning for unused arguments
//
#define UNUSED(x) (void)x;
#define UNUSED(x) (void)x;
#include "PHY/impl_defs_top_NB_IoT.h"
...
...
openair1/SCHED_NBIOT/phy_procedures_lte_eNb_NB_IoT.c
View file @
ec10bea0
...
...
@@ -1129,7 +1129,7 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16
LTE_eNB_ULSCH_t
*
ULSCH_ptr
;
uint8_t
ulsch_subframe
,
ulsch_frame
;
int
i
;
int8_t
UE_id
=
find_ue
(
rnti
,
PHY_vars_eNB_NB_IoT_g
[
Mod_id
][
CC_id
]);
int8_t
UE_id
=
find_ue
_NB_IoT
(
rnti
,
PHY_vars_eNB_NB_IoT_g
[
Mod_id
][
CC_id
]);
if
(
UE_id
==-
1
)
{
LOG_D
(
PHY
,
"Cannot find UE with rnti %x (Mod_id %d, CC_id %d)
\n
"
,
rnti
,
Mod_id
,
CC_id
);
...
...
openair2/ENB_APP/flexran_agent_extern.h
View file @
ec10bea0
...
...
@@ -35,6 +35,7 @@
#include "flexran_agent_mac_defs.h"
#include "flexran_agent_rrc_defs.h"
#include "flexran_agent_pdcp_defs.h"
#include "targets/COMMON/openairinterface5g_limits.h"
/* Control module interface for the communication of the PHY control module with the agent */
AGENT_PHY_xface
*
flexran_agent_get_phy_xface
(
mid_t
mod_id
);
...
...
openair2/LAYER2/MAC/defs_NB_IoT.h
View file @
ec10bea0
...
...
@@ -80,15 +80,6 @@
#define SHORT_PADDING 31
/*!\brief DCI PDU filled by MAC for the PHY */
typedef
struct
{
uint8_t
Num_ue_spec_dci
;
uint8_t
Num_common_dci
;
// uint32_t nCCE;
uint32_t
num_pdcch_symbols
;
DCI_ALLOC_t
dci_alloc
[
NUM_DCI_MAX
]
;
}
DCI_PDU
;
typedef
enum
tone_type_e
{
sixtone
=
0
,
...
...
@@ -690,7 +681,7 @@ typedef struct {
typedef
struct
{
/// Outgoing DCI for PHY generated by eNB scheduler
DCI_PDU
DCI_pdu
;
DCI_PDU
_NB_IoT
DCI_pdu
;
/// Outgoing BCCH pdu for PHY
BCCH_PDU
BCCH_pdu
;
/// Outgoing BCCH DCI allocation
...
...
openair2/PHY_INTERFACE/IF_Module_L2_primitives_NB_IoT.c
View file @
ec10bea0
#include "PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "LAYER2/MAC/proto_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h"
eNB_MAC_INST_NB_IoT
*
eNB_mac_inst
;
int
tmp
=
0
;
...
...
targets/RT/USER/lte-enb-nbiot.c
View file @
ec10bea0
...
...
@@ -58,7 +58,7 @@
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "
../..
/ARCH/COMMON/common_lib.h"
#include "
targets
/ARCH/COMMON/common_lib.h"
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
...
...
@@ -115,7 +115,7 @@ unsigned short config_frames[4] = {2,9,11,13};
extern
volatile
int
start_eNB
;
extern
volatile
int
oai_exit
;
extern
int
oaisim_flag
;
extern
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
extern
uint16_t
sf_ahead
;
uint8_t
seqno
;
//sequence number
...
...
@@ -530,6 +530,74 @@ extern void do_prach_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,int frame,int subframe);
///Modify to NB-IoT merge
int
setup_eNB_buffers
(
PHY_VARS_eNB_NB_IoT
**
phy_vars_eNB
,
openair0_config_t
*
openair0_cfg
)
{
int
i
,
j
;
int
CC_id
,
card
,
ant
;
//uint16_t N_TA_offset = 0;
LTE_DL_FRAME_PARMS
*
frame_parms
;
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
if
(
phy_vars_eNB
[
CC_id
])
{
frame_parms
=
&
(
phy_vars_eNB
[
CC_id
]
->
frame_parms
);
printf
(
"setup_eNB_buffers: frame_parms = %p
\n
"
,
frame_parms
);
}
else
{
printf
(
"phy_vars_eNB_NB_IoT[%d] not initialized
\n
"
,
CC_id
);
return
(
-
1
);
}
/*
if (frame_parms->frame_type == TDD) {
if (frame_parms->N_RB_DL == 100)
N_TA_offset = 624;
else if (frame_parms->N_RB_DL == 50)
N_TA_offset = 624/2;
else if (frame_parms->N_RB_DL == 25)
N_TA_offset = 624/4;
}
*/
if
(
openair0_cfg
[
CC_id
].
mmapped_dma
==
1
)
{
// replace RX signal buffers with mmaped HW versions
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_rx
;
i
++
)
{
card
=
i
/
4
;
ant
=
i
%
4
;
printf
(
"Mapping eNB CC_id %d, rx_ant %d, on card %d, chain %d
\n
"
,
CC_id
,
i
,
phy_vars_eNB
[
CC_id
]
->
rf_map
.
card
+
card
,
phy_vars_eNB
[
CC_id
]
->
rf_map
.
chain
+
ant
);
free
(
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
]);
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
]
=
openair0_cfg
[
phy_vars_eNB
[
CC_id
]
->
rf_map
.
card
+
card
].
rxbase
[
phy_vars_eNB
[
CC_id
]
->
rf_map
.
chain
+
ant
];
printf
(
"rxdata[%d] @ %p
\n
"
,
i
,
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
]);
for
(
j
=
0
;
j
<
16
;
j
++
)
{
printf
(
"rxbuffer %d: %x
\n
"
,
j
,
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
][
j
]);
phy_vars_eNB
[
CC_id
]
->
common_vars
.
rxdata
[
0
][
i
][
j
]
=
16
-
j
;
}
}
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_tx
;
i
++
)
{
card
=
i
/
4
;
ant
=
i
%
4
;
printf
(
"Mapping eNB CC_id %d, tx_ant %d, on card %d, chain %d
\n
"
,
CC_id
,
i
,
phy_vars_eNB
[
CC_id
]
->
rf_map
.
card
+
card
,
phy_vars_eNB
[
CC_id
]
->
rf_map
.
chain
+
ant
);
free
(
phy_vars_eNB
[
CC_id
]
->
common_vars
.
txdata
[
0
][
i
]);
phy_vars_eNB
[
CC_id
]
->
common_vars
.
txdata
[
0
][
i
]
=
openair0_cfg
[
phy_vars_eNB
[
CC_id
]
->
rf_map
.
card
+
card
].
txbase
[
phy_vars_eNB
[
CC_id
]
->
rf_map
.
chain
+
ant
];
printf
(
"txdata[%d] @ %p
\n
"
,
i
,
phy_vars_eNB
[
CC_id
]
->
common_vars
.
txdata
[
0
][
i
]);
for
(
j
=
0
;
j
<
16
;
j
++
)
{
printf
(
"txbuffer %d: %x
\n
"
,
j
,
phy_vars_eNB
[
CC_id
]
->
common_vars
.
txdata
[
0
][
i
][
j
]);
phy_vars_eNB
[
CC_id
]
->
common_vars
.
txdata
[
0
][
i
][
j
]
=
16
-
j
;
}
}
}
}
return
(
0
);
}
void
init_eNB_NB_IoT
(
eNB_func_NB_IoT_t
node_function
[],
eNB_timing_NB_IoT_t
node_timing
[],
int
nb_inst
,
eth_params_t
*
eth_params
,
int
single_thread_flag
,
int
wait_for_sync
)
{
int
CC_id
;
...
...
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