Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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 UE
Commits
2906ebd5
Commit
2906ebd5
authored
May 15, 2018
by
Masayuki HARADA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change compile option from UE_EXPANSION to UE_EXPANSION,PHY_TX_THREAD,PRE_SCD_THREAD.
parent
635f994d
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
76 additions
and
277 deletions
+76
-277
common/utils/itti/intertask_interface.c
common/utils/itti/intertask_interface.c
+0
-10
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+0
-4
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+22
-43
openair1/PHY/LTE_TRANSPORT/defs.h
openair1/PHY/LTE_TRANSPORT/defs.h
+3
-3
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+1
-1
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
+4
-4
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+0
-8
openair1/PHY/LTE_TRANSPORT/uci_tools.c
openair1/PHY/LTE_TRANSPORT/uci_tools.c
+1
-9
openair1/PHY/defs.h
openair1/PHY/defs.h
+2
-2
openair1/SCHED/defs.h
openair1/SCHED/defs.h
+0
-4
openair1/SCHED/fapi_l1.c
openair1/SCHED/fapi_l1.c
+8
-12
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+3
-7
openair1/SCHED/pusch_pc.c
openair1/SCHED/pusch_pc.c
+0
-8
openair2/COMMON/platform_types.h
openair2/COMMON/platform_types.h
+0
-4
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+2
-2
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+6
-10
openair2/LAYER2/MAC/extern.h
openair2/LAYER2/MAC/extern.h
+1
-1
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+2
-2
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+1
-1
openair2/LAYER2/MAC/vars.h
openair2/LAYER2/MAC/vars.h
+1
-1
openair2/RRC/LITE/L2_interface.c
openair2/RRC/LITE/L2_interface.c
+0
-3
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+0
-52
openair2/RRC/LITE/rrc_common.c
openair2/RRC/LITE/rrc_common.c
+0
-2
openair2/RRC/LITE/rrc_eNB.c
openair2/RRC/LITE/rrc_eNB.c
+4
-56
openair2/RRC/LITE/rrc_eNB_S1AP.c
openair2/RRC/LITE/rrc_eNB_S1AP.c
+0
-3
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+1
-1
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+14
-20
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+0
-2
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+0
-2
No files found.
common/utils/itti/intertask_interface.c
View file @
2906ebd5
...
...
@@ -54,9 +54,7 @@
#include "signals.h"
#include "timer.h"
#ifdef UE_EXPANSION
#include "log.h"
#endif
/* ITTI DEBUG groups */
#define ITTI_DEBUG_POLL (1<<0)
...
...
@@ -361,7 +359,6 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
/* Enqueue message in destination task queue */
if
(
lfds611_queue_enqueue
(
itti_desc
.
tasks
[
destination_task_id
].
message_queue
,
new
)
==
0
)
{
#ifdef UE_EXPANSION
LOG_I
(
UDP_
,
" Assertion Message %s(id:%d), number %lu with priority %d can not be sent from (%u:%s) to queue (%u:%s). discarding...
\n
"
,
itti_desc
.
messages_info
[
message_id
].
name
,
message_id
,
...
...
@@ -374,9 +371,6 @@ int itti_send_msg_to_task(task_id_t destination_task_id, instance_t instance, Me
int
result
=
itti_free
(
origin_task_id
,
message
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
return
0
;
#else
AssertFatal
(
0
,
"Error: lfds611_queue_enqueue returns 0, queue is full, exiting
\n
"
);
#endif
}
{
...
...
@@ -530,14 +524,10 @@ static inline void itti_receive_msg_internal_event_fd(task_id_t task_id, uint8_t
if
(
lfds611_queue_dequeue
(
itti_desc
.
tasks
[
task_id
].
message_queue
,
(
void
**
)
&
message
)
==
0
)
{
/* No element in list -> this should not happen */
#ifdef UE_EXPANSION
LOG_I
(
UDP_
,
"Assertion No message in queue for task %d while there are %d events and some for the messages queue!
\n
"
,
task_id
,
epoll_ret
);
/* Mark that the event has been processed */
itti_desc
.
threads
[
thread_id
].
events
[
i
].
events
&=
~
EPOLLIN
;
return
;
#else
AssertFatal
(
0
,
"No message in queue for task %d while there are %d events and some for the messages queue!
\n
"
,
task_id
,
epoll_ret
);
#endif
}
AssertFatal
(
message
!=
NULL
,
"Message from message queue is NULL!
\n
"
);
...
...
openair1/PHY/INIT/lte_init.c
View file @
2906ebd5
...
...
@@ -649,11 +649,7 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
void
phy_config_dedicated_eNB_step2
(
PHY_VARS_eNB
*
eNB
)
{
#ifndef UE_EXPANSION
uint8_t
UE_id
;
#else
uint16_t
UE_id
;
#endif
struct
PhysicalConfigDedicated
*
physicalConfigDedicated
;
LTE_DL_FRAME_PARMS
*
fp
=&
eNB
->
frame_parms
;
...
...
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
2906ebd5
...
...
@@ -800,19 +800,11 @@ void generate_RIV_tables()
// n_tilde_PRB(2,3) = (3,5)
// n_tilde_PRB(0,1) = (0,2)
#ifndef UE_EXPANSION
int8_t
find_dlsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
)
#else
int16_t
find_dlsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
)
#endif
{
#ifndef UE_EXPANSION
uint8_t
i
;
int8_t
first_free_index
=-
1
;
#else
uint16_t
i
;
int16_t
first_free_index
=-
1
;
#endif
AssertFatal
(
eNB
!=
NULL
,
"eNB is null
\n
"
);
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
...
...
@@ -829,19 +821,10 @@ int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
return
first_free_index
;
}
#ifndef UE_EXPANSION
int8_t
find_ulsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
)
#else
int16_t
find_ulsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
)
#endif
{
#ifndef UE_EXPANSION
uint8_t
i
;
int8_t
first_free_index
=-
1
;
#else
uint16_t
i
;
int16_t
first_free_index
=-
1
;
#endif
AssertFatal
(
eNB
!=
NULL
,
"eNB is null
\n
"
);
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
...
...
@@ -1089,7 +1072,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
}
dlsch0_harq
->
ndi
=
rel8
->
new_data_indicator_1
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -1271,7 +1254,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
dlsch0_harq
->
Qm
=
2
;
dlsch0_harq
->
TBS
=
TBStable
[
I_mcs
][
NPRB
-
1
];
dlsch0
->
harq_ids
[
frame
%
2
][
subframe
]
=
rel8
->
harq_process
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -1289,7 +1272,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
case
NFAPI_DL_DCI_FORMAT_1
:
dci_alloc
->
format
=
format1
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -1438,7 +1421,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
dlsch0_harq
->
dl_power_off
=
1
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -1653,7 +1636,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
// assume both TBs are active
dlsch0_harq
->
Nl
=
1
;
dlsch1_harq
->
Nl
=
1
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
dlsch1
->
active
[
subframe
]
=
1
;
#else
...
...
@@ -1665,7 +1648,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
// check if either TB is disabled (see 36-213 V11.3 Section )
if
((
dlsch0_harq
->
rvidx
==
1
)
&&
(
dlsch0_harq
->
mcs
==
0
))
{
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
0
;
#else
dlsch0
->
active
=
0
;
...
...
@@ -1674,7 +1657,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
}
if
((
dlsch1_harq
->
rvidx
==
1
)
&&
(
dlsch1_harq
->
mcs
==
0
))
{
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch1
->
active
[
subframe
]
=
0
;
#else
dlsch1
->
active
=
0
;
...
...
@@ -1690,7 +1673,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
dlsch0_harq
->
TBS
=
TBStable
[
get_I_TBS
(
dlsch0_harq
->
mcs
)][
dlsch0_harq
->
nb_rb
-
1
];
dlsch1_harq
->
TBS
=
TBStable
[
get_I_TBS
(
dlsch1_harq
->
mcs
)][
dlsch0_harq
->
nb_rb
-
1
];
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
((
dlsch0
->
active
[
subframe
]
==
1
)
&&
(
dlsch1
->
active
[
subframe
]
==
1
))
{
#else
if
((
dlsch0
->
active
==
1
)
&&
(
dlsch1
->
active
==
1
))
{
...
...
@@ -1704,7 +1687,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
dlsch1_harq
->
mimo_mode
=
ALAMOUTI
;
}
}
else
if
(
fp
->
nb_antenna_ports_eNB
==
4
)
{
// 4 antenna case
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
((
dlsch0
->
active
[
subframe
]
==
1
)
&&
(
dlsch1
->
active
[
subframe
]
==
1
))
{
#else
if
((
dlsch0
->
active
==
1
)
&&
(
dlsch1
->
active
==
1
))
{
...
...
@@ -1748,7 +1731,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
LOG_E
(
PHY
,
"Illegal value (3) for TPMI in Format 2A DCI
\n
"
);
break
;
}
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
}
else
if
(
dlsch0
->
active
[
subframe
]
==
1
)
{
#else
}
else
if
(
dlsch0
->
active
==
1
)
{
...
...
@@ -1772,7 +1755,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
LOG_E
(
PHY
,
"Illegal value %d for TPMI in Format 2A DCI with one transport block enabled
\n
"
,
rel8
->
precoding_information
);
break
;
}
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
}
else
if
(
dlsch1
->
active
[
subframe
]
==
1
)
{
#else
}
else
if
(
dlsch1
->
active
==
1
)
{
...
...
@@ -1802,14 +1785,14 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
}
// reset HARQ process if this is the first transmission
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
((
dlsch0
->
active
[
subframe
]
==
1
)
&&
(
dlsch0_harq
->
round
==
0
))
#else
if
((
dlsch0
->
active
==
1
)
&&
(
dlsch0_harq
->
round
==
0
))
#endif
dlsch0_harq
->
status
=
ACTIVE
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
((
dlsch1
->
active
[
subframe
]
==
1
)
&&
(
dlsch1_harq
->
round
==
0
))
#else
if
((
dlsch1
->
active
==
1
)
&&
(
dlsch1_harq
->
round
==
0
))
...
...
@@ -1987,7 +1970,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
printf
(
"RV0 = %d, RV1 = %d. MCS0 = %d, MCS1=%d
\n
"
,
rel8
->
redundancy_version_1
,
rel8
->
redundancy_version_2
,
rel8
->
mcs_1
,
rel8
->
mcs_2
);
#endif
if
(
TB0_active
&&
TB1_active
&&
rel8
->
transport_block_to_codeword_swap_flag
==
0
)
{
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
dlsch1
->
active
[
subframe
]
=
1
;
#else
...
...
@@ -2015,7 +1998,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
else
if
(
TB0_active
&&
TB1_active
&&
rel8
->
transport_block_to_codeword_swap_flag
==
1
)
{
dlsch0
=
eNB
->
dlsch
[
UE_id
][
1
];
dlsch1
=
eNB
->
dlsch
[
UE_id
][
0
];
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
dlsch1
->
active
[
subframe
]
=
1
;
#else
...
...
@@ -2039,7 +2022,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
dlsch1_harq
->
codeword
=
0
;
}
else
if
(
TB0_active
&&
(
TB1_active
==
0
))
{
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -2058,7 +2041,7 @@ void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_proc_t
#endif
}
else
if
((
TB0_active
==
0
)
&&
TB1_active
)
{
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch1
->
active
[
subframe
]
=
1
;
#else
dlsch1
->
active
=
1
;
...
...
@@ -2330,7 +2313,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,mDCI_ALLOC_t *d
case
10
:
// Format 6-1A
dci_alloc
->
format
=
format6_1A
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -2390,7 +2373,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,mDCI_ALLOC_t *d
break
;
case
11
:
// Format 6-1B
dci_alloc
->
format
=
format6_1B
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -2437,7 +2420,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,mDCI_ALLOC_t *d
}
case
12
:
// Format 6-2
dci_alloc
->
format
=
format6_2
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -2525,7 +2508,7 @@ void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,mDCI_ALLOC_t *d
dlsch0_harq
->
dl_power_off
=
1
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
subframe
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -2813,15 +2796,11 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
ulsch
->
harq_processes
[
harq_pid
]
->
Or1
=
0
;
ulsch
->
harq_processes
[
harq_pid
]
->
Or2
=
0
;
}
#ifndef UE_EXPANSION
else
ulsch
->
harq_processes
[
harq_pid
]
->
round
++
;
#else
else
{
ulsch
->
harq_processes
[
harq_pid
]
->
round
++
;
ulsch
->
harq_processes
[
harq_pid
]
->
TBS
=
ulsch_pdu
->
ulsch_pdu_rel8
.
size
<<
3
;
ulsch
->
harq_processes
[
harq_pid
]
->
Msc_initial
=
12
*
ulsch_pdu
->
ulsch_pdu_rel8
.
number_of_resource_blocks
;
}
#endif
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
"
,
ulsch
->
rnti
,
...
...
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
2906ebd5
...
...
@@ -184,7 +184,7 @@ typedef struct {
uint8_t
first_layer
;
/// codeword this transport block is mapped to
uint8_t
codeword
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
#ifdef Rel14
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
uint8_t
sib1_br_flag
;
...
...
@@ -279,7 +279,7 @@ typedef struct {
/// Allocated RNTI (0 means DLSCH_t is not currently used)
uint16_t
rnti
;
/// Active flag for baseband transmitter processing
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
uint8_t
active
[
10
];
#else
uint8_t
active
;
...
...
@@ -314,7 +314,7 @@ typedef struct {
int16_t
sqrt_rho_a
;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t
sqrt_rho_b
;
#ifndef
UE_EXPANSION
#ifndef
PHY_TX_THREAD
#ifdef Rel14
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
uint8_t
sib1_br_flag
;
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
2906ebd5
...
...
@@ -246,7 +246,7 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch)
if
(
dlsch
)
{
Mdlharq
=
dlsch
->
Mdlharq
;
dlsch
->
rnti
=
0
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
for
(
i
=
0
;
i
<
10
;
i
++
)
dlsch
->
active
[
i
]
=
0
;
#else
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c
View file @
2906ebd5
...
...
@@ -92,19 +92,19 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t
Nacc
=
4
;
uint16_t
j0
,
j
,
idelta
;
uint16_t
i
=
(
Ns
>>
1
)
+
(
10
*
frame
);
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
uint16_t
i0
=
dlsch
->
harq_processes
[
harq_pid
]
->
i0
;
#else
uint16_t
i0
=
dlsch
->
i0
;
#endif
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
(
dlsch
->
harq_processes
[
harq_pid
]
->
sib1_br_flag
==
1
)
Nacc
=
1
;
#else
if
(
dlsch
->
sib1_br_flag
==
1
)
Nacc
=
1
;
#endif
else
if
(
dlsch
->
rnti
==
0xFFFF
||
dlsch
->
rnti
==
0xFFFE
)
Nacc
=
(
frame_parms
->
frame_type
==
TDD
)
?
10
:
4
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
// Note: above SC-RNTI will also have to be added when/if implemented
else
if
(
dlsch
->
harq_processes
[
harq_pid
]
->
CEmode
==
CEmodeA
)
Nacc
=
1
;
else
if
(
dlsch
->
harq_processes
[
harq_pid
]
->
CEmode
==
CEmodeB
)
Nacc
=
(
frame_parms
->
frame_type
==
TDD
)
?
10
:
4
;
...
...
@@ -125,7 +125,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
// x1 is set in lte_gold_generic
if
(
mbsfn_flag
==
0
)
{
#ifdef Rel14
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
(
dlsch
->
harq_processes
[
harq_pid
]
->
i0
!=
0xFFFF
)
{
#else
if
(
dlsch
->
i0
!=
0xFFFF
)
{
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
2906ebd5
...
...
@@ -2260,18 +2260,10 @@ uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t
ul_subframe2pdcch_alloc_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
n
);
#ifndef UE_EXPANSION
int8_t
find_dlsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
);
int8_t
find_ulsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
);
int8_t
find_uci
(
uint16_t
rnti
,
int
frame
,
int
subframe
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
);
#else
int16_t
find_dlsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
);
int16_t
find_ulsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
);
int16_t
find_uci
(
uint16_t
rnti
,
int
frame
,
int
subframe
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
);
#endif
/**@}*/
#endif
openair1/PHY/LTE_TRANSPORT/uci_tools.c
View file @
2906ebd5
...
...
@@ -788,18 +788,10 @@ void print_CQI(void *o,UCI_format_t uci_format,unsigned char eNB_id,int N_RB_DL)
}
#ifndef UE_EXPANSION
int8_t
find_uci
(
uint16_t
rnti
,
int
frame
,
int
subframe
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
)
{
#else
int16_t
find_uci
(
uint16_t
rnti
,
int
frame
,
int
subframe
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
)
{
#endif
#ifndef UE_EXPANSION
uint8_t
i
;
int8_t
first_free_index
=-
1
;
#else
uint16_t
i
;
int16_t
first_free_index
=-
1
;
#endif
AssertFatal
(
eNB
!=
NULL
,
"eNB is null
\n
"
);
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
if
((
eNB
->
uci_vars
[
i
].
active
>
0
)
&&
...
...
openair1/PHY/defs.h
View file @
2906ebd5
...
...
@@ -422,7 +422,7 @@ typedef struct RU_proc_t_s {
int
num_slaves
;
/// array of pointers to slaves
struct
RU_proc_t_s
**
slave_proc
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
/// pthread structure for PRACH thread
pthread_t
pthread_phy_tx
;
pthread_mutex_t
mutex_phy_tx
;
...
...
@@ -442,7 +442,7 @@ typedef struct RU_proc_t_s {
/// \internal This variable is protected by \ref mutex_rf_tx.
int
instance_cnt_rf_tx
;
#endif
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
pthread_t
pthread_pre_scd
;
/// condition variable for time processing thread
pthread_cond_t
cond_pre_scd
;
...
...
openair1/SCHED/defs.h
View file @
2906ebd5
...
...
@@ -511,11 +511,7 @@ LTE_DL_FRAME_PARMS *get_lte_frame_parms(module_id_t Mod_id, uint8_t CC_id);
MU_MIMO_mode
*
get_mu_mimo_mode
(
module_id_t
Mod_id
,
uint8_t
CC_id
,
rnti_t
rnti
);
int16_t
get_hundred_times_delta_IF
(
PHY_VARS_UE
*
phy_vars_ue
,
uint8_t
eNB_id
,
uint8_t
harq_pid
);
#ifndef UE_EXPANSION
int16_t
get_hundred_times_delta_IF_eNB
(
PHY_VARS_eNB
*
phy_vars_eNB
,
uint8_t
UE_id
,
uint8_t
harq_pid
,
uint8_t
bw_factor
);
#else
int16_t
get_hundred_times_delta_IF_eNB
(
PHY_VARS_eNB
*
phy_vars_eNB
,
uint16_t
UE_id
,
uint8_t
harq_pid
,
uint8_t
bw_factor
);
#endif
int16_t
get_hundred_times_delta_IF_mac
(
module_id_t
module_idP
,
uint8_t
CC_id
,
rnti_t
rnti
,
uint8_t
harq_pid
);
int16_t
get_target_pusch_rx_power
(
module_id_t
module_idP
,
uint8_t
CC_id
);
...
...
openair1/SCHED/fapi_l1.c
View file @
2906ebd5
...
...
@@ -191,7 +191,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
// compute DL power control parameters
eNB
->
pdsch_config_dedicated
[
UE_id
].
p_a
=
rel8
->
pa
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
(
dlsch0
->
active
[
proc
->
subframe_tx
]){
# else
if
(
dlsch0
->
active
){
...
...
@@ -199,7 +199,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
computeRhoA_eNB
(
&
eNB
->
pdsch_config_dedicated
[
UE_id
],
dlsch0
,
dlsch0_harq
->
dl_power_off
,
eNB
->
frame_parms
.
nb_antenna_ports_eNB
);
computeRhoB_eNB
(
&
eNB
->
pdsch_config_dedicated
[
UE_id
],
&
(
eNB
->
frame_parms
.
pdsch_config_common
),
eNB
->
frame_parms
.
nb_antenna_ports_eNB
,
dlsch0
,
dlsch0_harq
->
dl_power_off
);
}
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
(
dlsch1
->
active
[
proc
->
subframe_tx
]){
#else
if
(
dlsch1
->
active
){
...
...
@@ -231,7 +231,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
}
#ifdef Rel14
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0_harq
->
sib1_br_flag
=
0
;
#else
dlsch0
->
sib1_br_flag
=
0
;
...
...
@@ -243,7 +243,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
dlsch0
->
Mdlharq
=
4
;
dlsch0
->
Nsoft
=
25344
;
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
(
rel13
->
pdsch_payload_type
==
0
)
dlsch0_harq
->
sib1_br_flag
=
1
;
#else
if
(
rel13
->
pdsch_payload_type
==
0
)
dlsch0
->
sib1_br_flag
=
1
;
...
...
@@ -274,7 +274,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
dlsch0_harq
->
rb_alloc
[
3
]
=
localRIV2alloc_LUT100_3
[
rel8
->
resource_block_coding
];
}
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0
->
active
[
proc
->
subframe_tx
]
=
1
;
#else
dlsch0
->
active
=
1
;
...
...
@@ -294,21 +294,21 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,eNB_rxtx_pr
dlsch0_harq
->
pdsch_start
=
rel10
->
pdsch_start
;
}
else
{
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0_harq
->
i0
=
0xFFFF
;
#else
dlsch0
->
i0
=
0xFFFF
;
#endif
}
#endif
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0_harq
->
i0
=
rel13
->
initial_transmission_sf_io
;
#else
dlsch0
->
i0
=
rel13
->
initial_transmission_sf_io
;
#endif
LOG_D
(
PHY
,
"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]
\n
"
,
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch0_harq
->
i0
,
#else
dlsch0
->
i0
,
...
...
@@ -566,11 +566,7 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
uint16_t
frame
,
uint8_t
subframe
,
uint8_t
srs_present
)
{
nfapi_ul_config_ulsch_pdu_rel8_t
*
rel8
=
&
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
;
#ifndef UE_EXPANSION
int8_t
UE_id
;
#else
int16_t
UE_id
;
#endif
// check if we have received a dci for this ue and ulsch descriptor is configured
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
2906ebd5
...
...
@@ -397,7 +397,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
stop_meas
(
&
eNB
->
dlsch_modulation_stats
);
}
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
dlsch
->
active
[
subframe
]
=
0
;
#else
dlsch
->
active
=
0
;
...
...
@@ -420,11 +420,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
int
subframe
=
proc
->
subframe_tx
;
uint32_t
i
,
aa
;
uint8_t
harq_pid
;
#ifndef UE_EXPANSION
int8_t
UE_id
=
0
;
#else
int16_t
UE_id
=
0
;
#endif
uint8_t
num_pdcch_symbols
=
0
;
uint8_t
num_dci
=
0
;
uint8_t
ul_subframe
;
...
...
@@ -544,7 +540,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
if
((
dlsch0
)
&&
(
dlsch0
->
rnti
>
0
)
&&
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
(
dlsch0
->
active
[
subframe
]
==
1
))
{
#else
(
dlsch0
->
active
==
1
))
{
...
...
@@ -576,7 +572,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
else
if
((
dlsch0
)
&&
(
dlsch0
->
rnti
>
0
)
&&
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
(
dlsch0
->
active
[
subframe
]
==
0
))
{
#else
(
dlsch0
->
active
==
0
))
{
...
...
openair1/SCHED/pusch_pc.c
View file @
2906ebd5
...
...
@@ -38,11 +38,7 @@
// This is the formula from Section 5.1.1.1 in 36.213 100*10*log10((2^(MPR*Ks)-1)), where MPR is in the range [0,6] and Ks=1.25
int16_t
hundred_times_delta_TF
[
100
]
=
{
-
32768
,
-
1268
,
-
956
,
-
768
,
-
631
,
-
523
,
-
431
,
-
352
,
-
282
,
-
219
,
-
161
,
-
107
,
-
57
,
-
9
,
36
,
79
,
120
,
159
,
197
,
234
,
269
,
304
,
337
,
370
,
402
,
434
,
465
,
495
,
525
,
555
,
583
,
612
,
640
,
668
,
696
,
723
,
750
,
777
,
803
,
829
,
856
,
881
,
907
,
933
,
958
,
983
,
1008
,
1033
,
1058
,
1083
,
1108
,
1132
,
1157
,
1181
,
1205
,
1229
,
1254
,
1278
,
1302
,
1325
,
1349
,
1373
,
1397
,
1421
,
1444
,
1468
,
1491
,
1515
,
1538
,
1562
,
1585
,
1609
,
1632
,
1655
,
1679
,
1702
,
1725
,
1748
,
1772
,
1795
,
1818
,
1841
,
1864
,
1887
,
1910
,
1933
,
1956
,
1980
,
2003
,
2026
,
2049
,
2072
,
2095
,
2118
,
2141
,
2164
,
2186
,
2209
,
2232
,
2255
};
uint16_t
hundred_times_log10_NPRB
[
100
]
=
{
0
,
301
,
477
,
602
,
698
,
778
,
845
,
903
,
954
,
1000
,
1041
,
1079
,
1113
,
1146
,
1176
,
1204
,
1230
,
1255
,
1278
,
1301
,
1322
,
1342
,
1361
,
1380
,
1397
,
1414
,
1431
,
1447
,
1462
,
1477
,
1491
,
1505
,
1518
,
1531
,
1544
,
1556
,
1568
,
1579
,
1591
,
1602
,
1612
,
1623
,
1633
,
1643
,
1653
,
1662
,
1672
,
1681
,
1690
,
1698
,
1707
,
1716
,
1724
,
1732
,
1740
,
1748
,
1755
,
1763
,
1770
,
1778
,
1785
,
1792
,
1799
,
1806
,
1812
,
1819
,
1826
,
1832
,
1838
,
1845
,
1851
,
1857
,
1863
,
1869
,
1875
,
1880
,
1886
,
1892
,
1897
,
1903
,
1908
,
1913
,
1919
,
1924
,
1929
,
1934
,
1939
,
1944
,
1949
,
1954
,
1959
,
1963
,
1968
,
1973
,
1977
,
1982
,
1986
,
1991
,
1995
,
2000
};
#ifndef UE_EXPANSION
int16_t
get_hundred_times_delta_IF_eNB
(
PHY_VARS_eNB
*
eNB
,
uint8_t
UE_id
,
uint8_t
harq_pid
,
uint8_t
bw_factor
)
#else
int16_t
get_hundred_times_delta_IF_eNB
(
PHY_VARS_eNB
*
eNB
,
uint16_t
UE_id
,
uint8_t
harq_pid
,
uint8_t
bw_factor
)
#endif
{
uint32_t
Nre
,
sumKr
,
MPR_x100
,
Kr
,
r
;
...
...
@@ -93,11 +89,7 @@ int16_t get_hundred_times_delta_IF_eNB(PHY_VARS_eNB *eNB,uint16_t UE_id,uint8_t
int16_t
get_hundred_times_delta_IF_mac
(
module_id_t
module_idP
,
uint8_t
CC_id
,
rnti_t
rnti
,
uint8_t
harq_pid
)
{
#ifndef UE_EXPANSION
int8_t
UE_id
;
#else
int16_t
UE_id
;
#endif
if
((
RC
.
eNB
==
NULL
)
||
(
module_idP
>
RC
.
nb_inst
)
||
(
CC_id
>
RC
.
nb_CC
[
module_idP
]))
{
LOG_E
(
PHY
,
"get_UE_stats: No eNB found (or not allocated) for Mod_id %d,CC_id %d
\n
"
,
module_idP
,
CC_id
);
return
-
1
;
...
...
openair2/COMMON/platform_types.h
View file @
2906ebd5
...
...
@@ -68,11 +68,7 @@ typedef int32_t sdu_size_t;
typedef
uint32_t
frame_t
;
typedef
int32_t
sframe_t
;
typedef
uint32_t
sub_frame_t
;
#ifndef UE_EXPANSION
typedef
uint8_t
module_id_t
;
#else
typedef
uint16_t
module_id_t
;
#endif
typedef
uint8_t
eNB_index_t
;
typedef
uint16_t
ue_id_t
;
typedef
int16_t
smodule_id_t
;
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
2906ebd5
...
...
@@ -768,7 +768,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
}
#if (!defined(
UE_EXPANSION_SIM2)) &&(!defined(UE_EXPANSION
))
#if (!defined(
PRE_SCD_THREAD
))
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frameP
,
subframeP
,
module_idP
);
...
...
@@ -821,7 +821,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
){
if
(
cc
[
CC_id
].
tdd_Config
==
NULL
||
!
(
is_UL_sf
(
&
cc
[
CC_id
],
subframeP
)))
allocate_CCEs
(
module_idP
,
CC_id
,
frameP
,
subframeP
,
2
);
}
}
stop_meas
(
&
RC
.
mac
[
module_idP
]
->
eNB_scheduler
);
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
2906ebd5
...
...
@@ -413,7 +413,7 @@ set_ul_DAI(int module_idP, int UE_idP, int CC_idP, int frameP,
}
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
extern
volatile
int16_t
phy_tx_txdataF_end
;
extern
int
oai_exit
;
#endif
...
...
@@ -553,11 +553,6 @@ schedule_ue_spec(module_id_t module_idP,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PREPROCESSOR
,
VCD_FUNCTION_OUT
);
#ifdef UE_EXPANSION
struct
timespec
time_req
,
time_rem
;
time_req
.
tv_sec
=
0
;
time_req
.
tv_nsec
=
10000
;
#endif
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
LOG_D
(
MAC
,
"doing schedule_ue_spec for CC_id %d
\n
"
,
CC_id
);
...
...
@@ -1118,9 +1113,7 @@ schedule_ue_spec(module_id_t module_idP,
header_len_dtch_last
=
0
;
// the header length of the last mac sdu
// lcid has to be sorted before the actual allocation (similar struct as ue_list).
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
// lcid = DTCH;
// {
for
(
lcid
=
DTCH
;
lcid
>=
DTCH
;
lcid
--
)
{
for
(
lcid
=
DTCH
;
lcid
>=
DTCH
;
lcid
--
)
{
#else
for
(
lcid
=
NB_RB_MAX
-
1
;
lcid
>=
DTCH
;
lcid
--
)
{
#endif
...
...
@@ -1327,7 +1320,10 @@ schedule_ue_spec(module_id_t module_idP,
post_padding
=
TBS
-
sdu_length_total
-
header_len_dcch
-
header_len_dtch
-
ta_len
;
// 1 is for the postpadding header
}
#ifdef UE_EXPANSION
#ifdef PHY_TX_THREAD
struct
timespec
time_req
,
time_rem
;
time_req
.
tv_sec
=
0
;
time_req
.
tv_nsec
=
10000
;
while
((
!
oai_exit
)
&&
(
phy_tx_txdataF_end
==
0
)){
nanosleep
(
&
time_req
,
&
time_rem
);
continue
;
...
...
openair2/LAYER2/MAC/extern.h
View file @
2906ebd5
...
...
@@ -103,7 +103,7 @@ extern int last_dlsch_ue_id[MAX_NUM_CCs];
extern
int
last_ulsch_ue_id
[
MAX_NUM_CCs
];
#endif
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
extern
uint16_t
pre_nb_rbs_required
[
2
][
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
extern
uint8_t
dlsch_ue_select_tbl_in_use
;
extern
uint8_t
new_dlsch_ue_select_tbl_in_use
;
...
...
openair2/LAYER2/MAC/pre_processor.c
View file @
2906ebd5
...
...
@@ -540,7 +540,7 @@ void sort_UEs(module_id_t Mod_idP, int frameP, sub_frame_t subframeP)
#endif
}
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
inline
uint16_t
search_rbs_required
(
uint16_t
mcs
,
uint16_t
TBS
,
uint16_t
NB_RB
,
uint16_t
step_size
){
uint16_t
nb_rb
,
i_TBS
,
tmp_TBS
;
i_TBS
=
get_I_TBS
(
mcs
);
...
...
@@ -1078,7 +1078,7 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id,
}
}
#if (!defined(
UE_EXPANSION_SIM2)) &&(!defined(UE_EXPANSION
))
#if (!defined(
PRE_SCD_THREAD
))
// Store the DLSCH buffer for each logical channel
store_dlsch_buffer
(
Mod_id
,
frameP
,
subframeP
);
...
...
openair2/LAYER2/MAC/proto.h
View file @
2906ebd5
...
...
@@ -227,7 +227,7 @@ void dlsch_scheduler_pre_processor_allocate (module_id_t Mod_id,
unsigned
char
rballoc_sub
[
MAX_NUM_CCs
][
N_RBG_MAX
],
unsigned
char
MIMO_mode_indicator
[
MAX_NUM_CCs
][
N_RBG_MAX
]);
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
void
pre_scd_nb_rbs_required
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
,
...
...
openair2/LAYER2/MAC/vars.h
View file @
2906ebd5
...
...
@@ -148,7 +148,7 @@ int last_dlsch_ue_id[MAX_NUM_CCs] = {-1};
int
last_ulsch_ue_id
[
MAX_NUM_CCs
]
=
{
-
1
};
#endif
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
uint16_t
pre_nb_rbs_required
[
2
][
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
uint8_t
dlsch_ue_select_tbl_in_use
;
uint8_t
new_dlsch_ue_select_tbl_in_use
;
...
...
openair2/RRC/LITE/L2_interface.c
View file @
2906ebd5
...
...
@@ -613,14 +613,11 @@ rrc_data_req(
)
//------------------------------------------------------------------------------
{
#ifdef UE_EXPANSION
if
(
sdu_sizeP
==
255
)
{
LOG_I
(
RRC
,
"sdu_sizeP == 255"
);
return
FALSE
;
}
#else
#endif
MSC_LOG_TX_MESSAGE
(
ctxt_pP
->
enb_flag
?
MSC_RRC_ENB
:
MSC_RRC_UE
,
ctxt_pP
->
enb_flag
?
MSC_PDCP_ENB
:
MSC_PDCP_UE
,
...
...
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
2906ebd5
...
...
@@ -1267,9 +1267,7 @@ do_RRCConnectionSetup(
RRCConnectionSetup_t
*
rrcConnectionSetup
=
NULL
;
#ifdef UE_EXPANSION
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
RC
.
eNB
[
ctxt_pP
->
module_id
][
CC_id
]
->
frame_parms
;
#endif
memset
((
void
*
)
&
dl_ccch_msg
,
0
,
sizeof
(
DL_CCCH_Message_t
));
dl_ccch_msg
.
message
.
present
=
DL_CCCH_MessageType_PR_c1
;
...
...
@@ -1620,17 +1618,12 @@ do_RRCConnectionSetup(
(
void
*
)
&
dl_ccch_msg
,
buffer
,
100
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
...
...
@@ -1699,17 +1692,12 @@ do_SecurityModeCommand(
(
void
*
)
&
dl_dcch_msg
,
buffer
,
100
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
...
...
@@ -1783,17 +1771,12 @@ do_UECapabilityEnquiry(
(
void
*
)
&
dl_dcch_msg
,
buffer
,
100
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
...
...
@@ -1951,17 +1934,12 @@ do_RRCConnectionReconfiguration(
(
void
*
)
&
dl_dcch_msg
,
buffer
,
RRC_BUF_SIZE
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %zd)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#ifdef XER_PRINT
xer_fprint
(
stdout
,
&
asn_DEF_DL_DCCH_Message
,(
void
*
)
&
dl_dcch_msg
);
#endif
...
...
@@ -2172,17 +2150,12 @@ do_RRCConnectionReestablishment(
(
void
*
)
&
dl_ccch_msg
,
buffer
,
100
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
...
...
@@ -2238,17 +2211,12 @@ do_RRCConnectionReestablishmentReject(
(
void
*
)
&
dl_ccch_msg
,
buffer
,
100
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
...
...
@@ -2305,17 +2273,12 @@ do_RRCConnectionReject(
(
void
*
)
&
dl_ccch_msg
,
buffer
,
100
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %ld)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
...
...
@@ -2502,17 +2465,12 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
(
void
*
)
mcch_message
,
buffer
,
100
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
...
...
@@ -2639,17 +2597,12 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
(
void
*
)
&
ul_dcch_msg
,
buffer
,
100
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#if defined(ENABLE_ITTI)
# if !defined(DISABLE_XER_SPRINT)
{
...
...
@@ -2775,17 +2728,12 @@ uint8_t do_Paging(uint8_t Mod_id, uint8_t *buffer, ue_paging_identity_t ue_pagin
Mod_id
,
paging_record_p
->
cn_Domain
,
ue_paging_identity
.
presenceMask
,
pcch_msg
.
message
.
choice
.
c1
.
choice
.
paging
.
pagingRecordList
->
list
.
count
);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_PCCH_Message
,
(
void
*
)
&
pcch_msg
,
buffer
,
RRC_BUF_SIZE
);
#ifdef UE_EXPANSION
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_I
(
RRC
,
"[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
#else
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
#endif
#ifdef XER_PRINT
xer_fprint
(
stdout
,
&
asn_DEF_PCCH_Message
,
(
void
*
)
&
pcch_msg
);
#endif
...
...
openair2/RRC/LITE/rrc_common.c
View file @
2906ebd5
...
...
@@ -506,9 +506,7 @@ rrc_rx_tx(
ue_context_p
->
ue_context
.
ue_release_timer_thres
)
{
LOG_I
(
RRC
,
"Removing UE %x instance
\n
"
,
ue_context_p
->
ue_context
.
rnti
);
ue_to_be_removed
=
ue_context_p
;
#ifdef UE_EXPANSION
ue_context_p
->
ue_context
.
ue_release_timer
=
0
;
#endif
break
;
}
}
...
...
openair2/RRC/LITE/rrc_eNB.c
View file @
2906ebd5
...
...
@@ -574,18 +574,6 @@ rrc_eNB_get_next_free_ue_context(
ctxt_pP
->
rnti
);
if
(
ue_context_p
==
NULL
)
{
#ifndef UE_EXPANSION
RB_FOREACH
(
ue_context_p
,
rrc_ue_tree_s
,
&
(
RC
.
rrc
[
ctxt_pP
->
module_id
]
->
rrc_ue_head
))
{
if
(
ue_context_p
->
ue_context
.
random_ue_identity
==
ue_identityP
)
{
LOG_D
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Cannot create new UE context, already exist rand UE id 0x%"
PRIx64
", uid %u
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ue_identityP
,
ue_context_p
->
local_uid
);
return
NULL
;
}
}
#endif
ue_context_p
=
rrc_eNB_allocate_new_UE_context
(
RC
.
rrc
[
ctxt_pP
->
module_id
]);
if
(
ue_context_p
==
NULL
)
{
...
...
@@ -813,14 +801,10 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s*
PHY_VARS_eNB
*
eNB_PHY
=
NULL
;
eNB_MAC_INST
*
eNB_MAC
=
RC
.
mac
[
enb_mod_idP
];
#endif
#ifdef UE_EXPANSION
if
(
enb_mod_idP
>=
NB_eNB_INST
)
{
LOG_I
(
RRC
,
"eNB inst invalid (%d/%d) for UE %x!
\n
"
,
enb_mod_idP
,
NB_eNB_INST
,
rnti
);
return
;
}
#else
AssertFatal
(
enb_mod_idP
<
NB_eNB_INST
,
"eNB inst invalid (%d/%d) for UE %x!"
,
enb_mod_idP
,
NB_eNB_INST
,
rnti
);
#endif
/* ue_context_p = rrc_eNB_get_ue_context(
&RC.rrc[enb_mod_idP],
rntiP
...
...
@@ -3940,15 +3924,11 @@ check_handovers(
ue_context_p
->
ue_context
.
handover_info
->
size
,
ue_context_p
->
ue_context
.
handover_info
->
buf
,
PDCP_TRANSMISSION_MODE_CONTROL
);
#ifdef UE_EXPANSION
if
(
result
!=
TRUE
)
{
LOG_I
(
RRC
,
"PDCP data request failed!
\n
"
);
return
;
}
#else
AssertFatal
(
result
==
TRUE
,
"PDCP data request failed!
\n
"
);
#endif
ue_context_p
->
ue_context
.
handover_info
->
ho_complete
=
0xF2
;
}
}
...
...
@@ -5846,42 +5826,24 @@ rrc_eNB_decode_ccch(
rrcConnectionRequest
=
&
ul_ccch_msg
->
message
.
choice
.
c1
.
choice
.
rrcConnectionRequest
.
criticalExtensions
.
choice
.
rrcConnectionRequest_r8
;
{
if
(
InitialUE_Identity_PR_randomValue
==
rrcConnectionRequest
->
ue_Identity
.
present
)
{
#ifdef UE_EXPANSION
if
(
rrcConnectionRequest
->
ue_Identity
.
choice
.
randomValue
.
size
!=
5
)
{
LOG_I
(
RRC
,
"wrong InitialUE-Identity randomValue size, expected 5, provided %d"
,
rrcConnectionRequest
->
ue_Identity
.
choice
.
randomValue
.
size
);
return
-
1
;
}
#else
AssertFatal
(
rrcConnectionRequest
->
ue_Identity
.
choice
.
randomValue
.
size
==
5
,
"wrong InitialUE-Identity randomValue size, expected 5, provided %d"
,
rrcConnectionRequest
->
ue_Identity
.
choice
.
randomValue
.
size
);
#endif
memcpy
(((
uint8_t
*
)
&
random_value
)
+
3
,
rrcConnectionRequest
->
ue_Identity
.
choice
.
randomValue
.
buf
,
rrcConnectionRequest
->
ue_Identity
.
choice
.
randomValue
.
size
);
/* if there is already a registered UE (with another RNTI) with this random_value,
* the current one must be removed from MAC/PHY (zombie UE)
*/
#ifndef UE_EXPANSION
if
((
ue_context_p
=
rrc_eNB_ue_context_random_exist
(
ctxt_pP
,
random_value
)))
{
LOG_W
(
RRC
,
"new UE rnti %x (coming with random value) is already there as UE %x, removing %x from MAC/PHY
\n
"
,
ctxt_pP
->
rnti
,
ue_context_p
->
ue_context
.
rnti
,
ctxt_pP
->
rnti
);
rrc_mac_remove_ue
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
ue_context_p
=
NULL
;
return
0
;
}
else
{
ue_context_p
=
rrc_eNB_get_next_free_ue_context
(
ctxt_pP
,
random_value
);
}
#else
if
((
ue_context_p
=
rrc_eNB_ue_context_random_exist
(
ctxt_pP
,
random_value
)))
{
LOG_W
(
RRC
,
"new UE rnti %x (coming with random value) is already there as UE %x, removing %x from MAC/PHY
\n
"
,
ctxt_pP
->
rnti
,
ue_context_p
->
ue_context
.
rnti
,
ue_context_p
->
ue_context
.
rnti
);
ue_context_p
->
ue_context
.
ul_failure_timer
=
20000
;
}
ue_context_p
=
rrc_eNB_get_next_free_ue_context
(
ctxt_pP
,
random_value
);
#endif
}
else
if
(
InitialUE_Identity_PR_s_TMSI
==
rrcConnectionRequest
->
ue_Identity
.
present
)
{
/* Save s-TMSI */
S_TMSI_t
s_TMSI
=
rrcConnectionRequest
->
ue_Identity
.
choice
.
s_TMSI
;
...
...
@@ -6864,16 +6826,10 @@ rrc_enb_task(
LOG_I
(
RRC
,
"Decoding CCCH : inst %d, CC_id %d, ctxt %p, sib_info_p->Rx_buffer.payload_size %d
\n
"
,
instance
,
CC_id
,
&
ctxt
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
);
#ifdef UE_EXPANSION
if
(
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
>=
RRC_BUFFER_SIZE_MAX
)
{
LOG_I
(
RRC
,
"CCCH message has size %d > %d
\n
"
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
,
RRC_BUFFER_SIZE_MAX
);
break
;
}
#else
AssertFatal
(
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
<
RRC_BUFFER_SIZE_MAX
,
"CCCH message has size %d > %d
\n
"
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
,
RRC_BUFFER_SIZE_MAX
);
#endif
memcpy
(
srb_info_p
->
Rx_buffer
.
Payload
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu
,
RRC_MAC_CCCH_DATA_IND
(
msg_p
).
sdu_size
);
...
...
@@ -6901,14 +6857,10 @@ rrc_enb_task(
// Message buffer has been processed, free it now.
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg_p
),
RRC_DCCH_DATA_IND
(
msg_p
).
sdu_p
);
#ifdef UE_EXPANSION
if
(
result
!=
EXIT_SUCCESS
)
{
LOG_I
(
RRC
,
"Failed to free memory (%d)!
\n
"
,
result
);
break
;
}
#else
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
#endif
break
;
# if defined(ENABLE_USE_MME)
...
...
@@ -6977,14 +6929,10 @@ rrc_enb_task(
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
msg_p
),
msg_p
);
#ifdef UE_EXPANSION
if
(
result
!=
EXIT_SUCCESS
)
{
LOG_I
(
RRC
,
"Failed to free memory (%d)!
\n
"
,
result
);
continue
;
}
#else
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
#endif
if
(
result
!=
EXIT_SUCCESS
)
{
LOG_I
(
RRC
,
"Failed to free memory (%d)!
\n
"
,
result
);
continue
;
}
msg_p
=
NULL
;
}
}
...
...
openair2/RRC/LITE/rrc_eNB_S1AP.c
View file @
2906ebd5
...
...
@@ -1957,14 +1957,11 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
buffer
,
S1AP_PAGING_IND
(
msg_p
).
ue_paging_identity
,
S1AP_PAGING_IND
(
msg_p
).
cn_domain
);
#ifdef UE_EXPANSION
if
(
length
==
-
1
)
{
LOG_I
(
RRC
,
"do_Paging error"
);
return
-
1
;
}
#else
#endif
message_buffer
=
itti_malloc
(
TASK_RRC_ENB
,
TASK_PDCP_ENB
,
length
);
/* Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling). */
memcpy
(
message_buffer
,
buffer
,
length
);
...
...
targets/RT/USER/lte-enb.c
View file @
2906ebd5
...
...
@@ -243,7 +243,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
//if (wait_CCs(proc)<0) return(-1);
if
(
oai_exit
)
return
(
-
1
);
#if
(!defined(UE_EXPANSION_SIM2)) &&(!defined(UE_EXPANSION))
#if
ndef PHY_TX_THREAD
phy_procedures_eNB_TX
(
eNB
,
proc
,
no_relay
,
NULL
,
1
);
#endif
if
(
release_thread
(
&
proc
->
mutex_rxtx
,
&
proc
->
instance_cnt_rxtx
,
thread_name
)
<
0
)
return
(
-
1
);
...
...
targets/RT/USER/lte-ru.c
View file @
2906ebd5
...
...
@@ -110,9 +110,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "T.h"
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
#include "pdcp.h"
#endif
extern
volatile
int
oai_exit
;
...
...
@@ -736,7 +734,7 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) {
proc
->
subframe_rx
=
(
proc
->
timestamp_rx
/
fp
->
samples_per_tti
)
%
10
;
// synchronize first reception to frame 0 subframe 0
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
proc
->
timestamp_phy_tx
=
proc
->
timestamp_rx
+
(
3
*
fp
->
samples_per_tti
);
proc
->
subframe_phy_tx
=
(
proc
->
subframe_rx
+
3
)
%
10
;
proc
->
frame_phy_tx
=
(
proc
->
subframe_rx
>
6
)
?
(
proc
->
frame_rx
+
1
)
&
1023
:
proc
->
frame_rx
;
...
...
@@ -1416,7 +1414,7 @@ static void* ru_stats_thread(void* param) {
return
(
NULL
);
}
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
int
first_phy_tx
=
1
;
volatile
int16_t
phy_tx_txdataF_end
;
volatile
int16_t
phy_tx_end
;
...
...
@@ -1434,15 +1432,13 @@ static void* ru_thread( void* param ) {
// set default return value
ru_thread_status
=
0
;
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
dlsch_ue_select_tbl_in_use
=
1
;
#endif
#ifdef UE_EXPANSION
struct
timespec
time_req
,
time_rem
;
time_req
.
tv_sec
=
0
;
time_req
.
tv_nsec
=
10000
;
#endif
// set default return value
thread_top_init
(
"ru_thread"
,
0
,
870000
,
1000000
,
1000000
);
...
...
@@ -1522,7 +1518,7 @@ static void* ru_thread( void* param ) {
if
(
ru
->
fh_south_in
)
ru
->
fh_south_in
(
ru
,
&
frame
,
&
subframe
);
else
AssertFatal
(
1
==
0
,
"No fronthaul interface at south port"
);
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
(
first_phy_tx
==
0
)
{
phy_tx_end
=
0
;
...
...
@@ -1579,7 +1575,7 @@ static void* ru_thread( void* param ) {
// If this proc is to provide synchronization, do so
wakeup_slaves
(
proc
);
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
new_dlsch_ue_select_tbl_in_use
=
dlsch_ue_select_tbl_in_use
;
dlsch_ue_select_tbl_in_use
=
!
dlsch_ue_select_tbl_in_use
;
memcpy
(
&
pre_scd_eNB_UE_stats
,
&
RC
.
mac
[
ru
->
eNB_list
[
0
]
->
Mod_id
]
->
UE_list
.
eNB_UE_stats
,
sizeof
(
eNB_UE_STATS
)
*
MAX_NUM_CCs
*
NUMBER_OF_UE_MAX
);
...
...
@@ -1614,7 +1610,7 @@ static void* ru_thread( void* param ) {
wait_on_condition
(
&
proc
->
mutex_eNBs
,
&
proc
->
cond_eNBs
,
&
proc
->
instance_cnt_eNBs
,
"ru_thread"
);
#ifndef
UE_EXPANSION
#ifndef
PHY_TX_THREAD
// do TX front-end processing if needed (precoding and/or IDFTs)
if
(
ru
->
feptx_prec
)
ru
->
feptx_prec
(
ru
);
...
...
@@ -1720,7 +1716,7 @@ void *ru_thread_synch(void *arg) {
}
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
void
*
pre_scd_thread
(
void
*
param
){
static
int
eNB_pre_scd_status
;
protocol_ctxt_t
ctxt
;
...
...
@@ -1774,7 +1770,7 @@ void* pre_scd_thread( void* param ){
}
#endif
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
/*!
* \brief The phy tx thread of eNB.
* \param param is a \ref eNB_proc_t structure which contains the info what to process.
...
...
@@ -1952,7 +1948,7 @@ void init_RU_proc(RU_t *ru) {
pthread_attr_init
(
&
proc
->
attr_prach_br
);
#endif
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
proc
->
instance_cnt_phy_tx
=
-
1
;
pthread_mutex_init
(
&
proc
->
mutex_phy_tx
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_phy_tx
,
NULL
);
...
...
@@ -1972,7 +1968,7 @@ void init_RU_proc(RU_t *ru) {
#endif
pthread_create
(
&
proc
->
pthread_FH
,
attr_FH
,
ru_thread
,
(
void
*
)
ru
);
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
proc
->
instance_pre_scd
=
-
1
;
pthread_mutex_init
(
&
proc
->
mutex_pre_scd
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_pre_scd
,
NULL
);
...
...
@@ -1980,7 +1976,7 @@ void init_RU_proc(RU_t *ru) {
pthread_setname_np
(
proc
->
pthread_pre_scd
,
"pre_scd_thread"
);
#endif
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
pthread_create
(
&
proc
->
pthread_phy_tx
,
NULL
,
eNB_thread_phy_tx
,
(
void
*
)
ru
);
pthread_setname_np
(
proc
->
pthread_phy_tx
,
"phy_tx_thread"
);
pthread_create
(
&
proc
->
pthread_rf_tx
,
NULL
,
rf_tx
,
(
void
*
)
ru
);
...
...
@@ -2428,11 +2424,9 @@ void init_RU(char *rf_config_file) {
void
stop_ru
(
RU_t
*
ru
)
{
#if defined(UE_EXPANSION) || defined(UE_EXPANSION_SIM2)
int
*
status
;
#endif
int
*
status
;
printf
(
"Stopping RU %p processing threads
\n
"
,(
void
*
)
ru
);
#if defined(
UE_EXPANSION) || defined(UE_EXPANSION_SIM2
)
#if defined(
PRE_SCD_THREAD
)
if
(
ru
){
ru
->
proc
.
instance_pre_scd
=
0
;
pthread_cond_signal
(
&
ru
->
proc
.
cond_pre_scd
);
...
...
@@ -2441,7 +2435,7 @@ void stop_ru(RU_t *ru) {
pthread_cond_destroy
(
&
ru
->
proc
.
cond_pre_scd
);
}
#endif
#ifdef
UE_EXPANSION
#ifdef
PHY_TX_THREAD
if
(
ru
){
ru
->
proc
.
instance_cnt_phy_tx
=
0
;
pthread_cond_signal
(
&
ru
->
proc
.
cond_phy_tx
);
...
...
targets/RT/USER/lte-softmodem.c
View file @
2906ebd5
...
...
@@ -1454,11 +1454,9 @@ int main( int argc, char **argv )
// cleanup
if
(
UE_flag
==
1
)
{
}
else
{
#ifdef UE_EXPANSION
for
(
ru_id
=
0
;
ru_id
<
RC
.
nb_RU
;
ru_id
++
)
{
stop_ru
(
RC
.
ru
[
ru_id
]);
}
#endif
stop_eNB
(
1
);
}
...
...
targets/RT/USER/lte-softmodem.h
View file @
2906ebd5
...
...
@@ -245,9 +245,7 @@ extern void kill_eNB_proc(int inst);
// In lte-ru.c
extern
void
init_RU
(
const
char
*
);
#ifdef UE_EXPANSION
extern
void
stop_ru
(
RU_t
*
ru
);
#endif
// In lte-ue.c
extern
int
setup_ue_buffers
(
PHY_VARS_UE
**
phy_vars_ue
,
openair0_config_t
*
openair0_cfg
);
...
...
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