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
zzha zzha
OpenXG-RAN
Commits
c8cef9e1
Commit
c8cef9e1
authored
Oct 20, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes after merge with develop
parent
ea11edad
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
38 additions
and
63 deletions
+38
-63
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+3
-3
openair1/SCHED/fapi_l1.c
openair1/SCHED/fapi_l1.c
+4
-4
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+5
-4
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+3
-31
openair2/LAYER2/MAC/mac_proto.h
openair2/LAYER2/MAC/mac_proto.h
+0
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
...TS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
+1
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+16
-13
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+4
-4
No files found.
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
c8cef9e1
...
...
@@ -125,7 +125,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
slotoffsetF
=
0
;
blockoffsetF
=
slotoffsetF
+
fp
->
ofdm_symbol_size
-
db_halflength
;
LOG_
I
(
PHY
,
"send UL_IF4p5: RU %d frame %d, subframe %d
\n
"
,
ru
->
idx
,
frame
,
subframe
);
LOG_
D
(
PHY
,
"send UL_IF4p5: RU %d frame %d, subframe %d
\n
"
,
ru
->
idx
,
frame
,
subframe
);
if
(
subframe_select
(
fp
,
subframe
)
==
SF_S
)
{
nsym
=
fp
->
ul_symbols_in_S_subframe
;
...
...
@@ -249,7 +249,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
(
void
*
)
rxF
,
PRACH_BLOCK_SIZE_BYTES
);
}
if
(
frame
==
0
)
LOG_
I
(
PHY
,
"signal energy prach %d
\n
"
,
dB_fixed
(
signal_energy
(
rxF
,
839
)));
if
(
frame
==
0
)
LOG_
D
(
PHY
,
"signal energy prach %d
\n
"
,
dB_fixed
(
signal_energy
(
rxF
,
839
)));
}
if
(
ru
->
idx
<=
1
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0
+
ru
->
idx
,
1
);
if
((
ru
->
ifdevice
.
trx_write_func
(
&
ru
->
ifdevice
,
...
...
@@ -410,7 +410,7 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
PRACH_BLOCK_SIZE_BYTES
);
}
}
if
(
frame
==
0
)
LOG_
I
(
PHY
,
"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB
\n
"
,
ru
->
idx
,
*
frame
,
*
subframe
,
if
(
frame
==
0
)
LOG_
D
(
PHY
,
"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => %d dB
\n
"
,
ru
->
idx
,
*
frame
,
*
subframe
,
dB_fixed
(
signal_energy
((
int
*
)
&
prach_rxsigF
[
0
][
0
],
839
)));
for
(
idx
=
0
;
idx
<
ru
->
num_eNB
;
idx
++
)
ru
->
wakeup_prach_eNB
(
ru
->
eNB_list
[
idx
],
ru
,
*
frame
,
*
subframe
);
...
...
openair1/SCHED/fapi_l1.c
View file @
c8cef9e1
...
...
@@ -530,7 +530,7 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
{
LTE_eNB_UCI
*
uci
=
&
eNB
->
uci_vars
[
UE_id
];
LOG_
I
(
PHY
,
"Frame %d, Subframe %d: Programming UCI_HARQ process (type %d)
\n
"
,
frame
,
subframe
,
HARQ
);
LOG_
D
(
PHY
,
"Frame %d, Subframe %d: Programming UCI_HARQ process (type %d)
\n
"
,
frame
,
subframe
,
HARQ
);
uci
->
frame
=
frame
;
uci
->
subframe
=
subframe
;
uci
->
rnti
=
ul_config_pdu
->
uci_harq_pdu
.
ue_information
.
ue_information_rel8
.
rnti
;
...
...
@@ -578,7 +578,7 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
if
(
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
)
{
AssertFatal
((
UE_id
=
find_ulsch
(
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
rnti
,
eNB
,
SEARCH_EXIST_OR_FREE
))
>=
0
,
"No existing UE ULSCH for rnti %x
\n
"
,
rel8
->
rnti
);
LOG_
I
(
PHY
,
"Applying UL config for UE %d, rnti %x in frame %d, subframe %d, modulation %d, rvidx %d
\n
"
,
UE_id
,
rel8
->
rnti
,
frame
,
subframe
,
rel8
->
modulation_type
,
rel8
->
redundancy_version
);
LOG_
D
(
PHY
,
"Applying UL config for UE %d, rnti %x in frame %d, subframe %d, modulation %d, rvidx %d
\n
"
,
UE_id
,
rel8
->
rnti
,
frame
,
subframe
,
rel8
->
modulation_type
,
rel8
->
redundancy_version
);
fill_ulsch
(
eNB
,
UE_id
,
&
ul_config_pdu
->
ulsch_pdu
,
frame
,
subframe
);
...
...
@@ -703,7 +703,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
NFAPI_SFNSF2SFN
(
HI_DCI0_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
HI_DCI0_req
->
sfn_sf
),
number_hi_dci0_pdu
);
if
(
UL_req
!=
NULL
)
LOG_
I
(
PHY
,
"NFAPI: ul_cfg:SFN/SF:%04d%d:pdus:%d num_pdcch_symbols:%d
\n
"
,
LOG_
D
(
PHY
,
"NFAPI: ul_cfg:SFN/SF:%04d%d:pdus:%d num_pdcch_symbols:%d
\n
"
,
NFAPI_SFNSF2SFN
(
UL_req
->
sfn_sf
),
NFAPI_SFNSF2SF
(
UL_req
->
sfn_sf
),
number_ul_pdu
,
eNB
->
pdcch_vars
[
subframe
&
1
].
num_pdcch_symbols
);
...
...
@@ -872,7 +872,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
else
{
for
(
i
=
0
;
i
<
number_ul_pdu
;
i
++
)
{
ul_config_pdu
=
&
UL_req
->
ul_config_request_body
.
ul_config_pdu_list
[
i
];
LOG_
I
(
PHY
,
"NFAPI: ul_pdu %d : type %d
\n
"
,
i
,
ul_config_pdu
->
pdu_type
);
LOG_
D
(
PHY
,
"NFAPI: ul_pdu %d : type %d
\n
"
,
i
,
ul_config_pdu
->
pdu_type
);
AssertFatal
(
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE
||
ul_config_pdu
->
pdu_type
==
NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE
||
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
c8cef9e1
...
...
@@ -189,7 +189,7 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
int
**
txdataF
=
eNB
->
common_vars
.
txdataF
;
uint8_t
*
pbch_pdu
=&
eNB
->
pbch_pdu
[
0
];
LOG_
I
(
PHY
,
"common_signal_procedures: frame %d, subframe %d fdd:%s dir:%s
\n
"
,
frame
,
subframe
,
fp
->
frame_type
==
FDD
?
"FDD"
:
"TDD"
,
subframe_select
(
fp
,
subframe
)
==
SF_DL
?
"DL"
:
"UL?"
);
LOG_
D
(
PHY
,
"common_signal_procedures: frame %d, subframe %d fdd:%s dir:%s
\n
"
,
frame
,
subframe
,
fp
->
frame_type
==
FDD
?
"FDD"
:
"TDD"
,
subframe_select
(
fp
,
subframe
)
==
SF_DL
?
"DL"
:
"UL?"
);
// generate Cell-Specific Reference Signals for both slots
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX
,
1
);
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
c8cef9e1
...
...
@@ -197,7 +197,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t * ra, frame_t frameP,
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
frequency_hopping_bits
=
0
;
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
new_data_indication
=
0
;
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
redundancy_version
=
rvseq
[
ra
->
msg3_round
];
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
harq_process_number
=
((
ra
->
Msg3_frame
*
10
)
+
ra
->
Msg3_subframe
)
&
7
;
//
subframe2harqpid(cc, ra->Msg3_frame, ra->Msg3_subframe);
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
harq_process_number
=
subframe2harqpid
(
cc
,
ra
->
Msg3_frame
,
ra
->
Msg3_subframe
);
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
ul_tx_mode
=
0
;
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
current_tx_nb
=
0
;
ul_config_pdu
->
ulsch_pdu
.
ulsch_pdu_rel8
.
n_srs
=
1
;
...
...
@@ -475,7 +475,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
// Program UL processing for Msg3, same as regular LTE
get_Msg3alloc
(
&
cc
[
CC_idP
],
subframeP
,
frameP
,
&
ra
->
Msg3_frame
,
&
ra
->
Msg3_subframe
);
//
add_msg3(module_idP, CC_idP, ra, frameP, subframeP);
add_msg3
(
module_idP
,
CC_idP
,
ra
,
frameP
,
subframeP
);
fill_rar_br
(
mac
,
CC_idP
,
ra
,
frameP
,
subframeP
,
cc
[
CC_idP
].
RAR_pdu
.
payload
,
ra
->
rach_resource_type
-
1
);
...
...
@@ -580,7 +580,7 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
ra
->
Msg3_subframe
);
fill_rar
(
module_idP
,
CC_idP
,
ra
,
frameP
,
cc
[
CC_idP
].
RAR_pdu
.
payload
,
N_RB_DL
,
7
);
//
add_msg3(module_idP, CC_idP, ra, frameP, subframeP);
add_msg3
(
module_idP
,
CC_idP
,
ra
,
frameP
,
subframeP
);
ra
->
state
=
WAITMSG3
;
LOG_D
(
MAC
,
"[eNB %d][RAPROC] Frame %d, Subframe %d: state:WAITMSG3
\n
"
,
module_idP
,
frameP
,
subframeP
);
...
...
@@ -1430,12 +1430,13 @@ schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
check_Msg4_retransmission
(
module_idP
,
CC_id
,
frameP
,
subframeP
,
ra
);
/*
int absSF = (frameP*10)+subframeP;
int msg3_absSF = (ra->Msg3_frame*10) + ra->Msg3_subframe;
// This is done here to account for delay in TDD programming of Msg3
if (ra->state == WAITMSG3 && ((absSF+4)%10240) == msg3_absSF) add_msg3(module_idP, CC_id, ra, frameP, subframeP);
*/
}
// for i=0 .. N_RA_PROC-1
}
// CC_id
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
c8cef9e1
...
...
@@ -307,34 +307,6 @@ get_Msg3allocret(COMMON_channels_t * cc,
}
}
uint8_t
pusch_sf_to_phich_sfoffset
(
COMMON_channels_t
*
cc
,
sub_frame_t
subframe
)
{
if
(
cc
->
tdd_Config
==
NULL
)
return
(
4
);
else
switch
(
cc
->
tdd_Config
->
subframeAssignment
)
{
case
0
:
if
(
subframe
==
2
||
subframe
==
7
)
return
(
4
);
else
if
(
subframe
==
3
||
subframe
==
8
)
return
(
7
);
else
if
(
subframe
==
4
||
subframe
==
9
)
return
(
6
);
break
;
case
1
:
if
(
subframe
==
2
||
subframe
==
7
)
return
(
4
);
else
return
(
6
);
break
;
case
2
:
case
3
:
case
4
:
case
5
:
return
(
6
);
break
;
case
6
:
if
(
subframe
==
2
||
subframe
==
7
)
return
(
4
);
else
if
(
subframe
==
3
||
subframe
==
4
)
return
(
6
);
else
if
(
subframe
==
8
)
return
(
7
);
break
;
}
}
uint8_t
subframe2harqpid
(
COMMON_channels_t
*
cc
,
frame_t
frame
,
sub_frame_t
subframe
)
...
...
@@ -343,9 +315,9 @@ subframe2harqpid(COMMON_channels_t * cc, frame_t frame,
AssertFatal
(
cc
!=
NULL
,
"cc is null
\n
"
);
//
if (cc->tdd_Config == NULL) { // FDD
if
(
cc
->
tdd_Config
==
NULL
)
{
// FDD
ret
=
(((
frame
<<
1
)
+
subframe
)
&
7
);
/*
} else {
}
else
{
switch
(
cc
->
tdd_Config
->
subframeAssignment
)
{
case
1
:
if
((
subframe
==
2
)
||
...
...
@@ -408,7 +380,7 @@ subframe2harqpid(COMMON_channels_t * cc, frame_t frame,
(
int
)
cc
->
tdd_Config
->
subframeAssignment
);
}
}
*/
return
ret
;
}
...
...
openair2/LAYER2/MAC/mac_proto.h
View file @
c8cef9e1
...
...
@@ -1109,7 +1109,6 @@ uint8_t getQm(uint8_t mcs);
uint8_t
subframe2harqpid
(
COMMON_channels_t
*
cc
,
frame_t
frame
,
sub_frame_t
subframe
);
uint8_t
pusch_sf_to_phich_sfoffset
(
COMMON_channels_t
*
cc
,
sub_frame_t
subframe
);
void
get_srs_pos
(
COMMON_channels_t
*
cc
,
uint16_t
isrs
,
uint16_t
*
psrsPeriodicity
,
uint16_t
*
psrsOffset
);
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
View file @
c8cef9e1
...
...
@@ -211,7 +211,7 @@ log_config = {
global_log_verbosity
=
"medium"
;
hw_log_level
=
"info"
;
hw_log_verbosity
=
"medium"
;
phy_log_level
=
"
debug
"
;
phy_log_level
=
"
info
"
;
phy_log_verbosity
=
"medium"
;
mac_log_level
=
"info"
;
mac_log_verbosity
=
"high"
;
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
View file @
c8cef9e1
...
...
@@ -32,7 +32,7 @@ log_config = {
global_log_verbosity
=
"medium"
;
hw_log_level
=
"info"
;
hw_log_verbosity
=
"medium"
;
phy_log_level
=
"
debug
"
;
phy_log_level
=
"
info
"
;
phy_log_verbosity
=
"medium"
;
mac_log_level
=
"info"
;
mac_log_verbosity
=
"high"
;
...
...
targets/RT/USER/lte-enb.c
View file @
c8cef9e1
...
...
@@ -322,16 +322,16 @@ static void* tx_thread(void* param) {
//PHY_VARS_eNB *eNB = RC.eNB[0][proc->CC_id];
char
thread_name
[
100
];
sprintf
(
thread_name
,
"TXnp4_%d
\n
"
,
&
eNB
->
proc
.
proc_rxtx
[
0
]
==
proc
?
0
:
1
);
sprintf
(
thread_name
,
"TXnp4_%d"
,
&
eNB
->
proc
.
proc_rxtx
[
0
]
==
proc
?
0
:
1
);
thread_top_init
(
thread_name
,
1
,
470000
,
500000
,
500000
);
//wait_sync("tx_thread");
while
(
!
oai_exit
)
{
//printf("Entering tx_thread, proc1->cond_rxtx, proc1->instance_cnt_rxtx
, frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d\n",
proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx);
//printf("Entering tx_thread, proc1->cond_rxtx, proc1->instance_cnt_rxtx
%d, frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d\n", proc->instance_cnt_rxtx,
proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx);
if
(
wait_on_condition
(
&
proc
->
mutex_rxtx
,
&
proc
->
cond_rxtx
,
&
proc
->
instance_cnt_rxtx
,
thread_name
)
<
0
)
break
;
//printf("Passed tx_thread proc1->cond_rxtx, frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d\n", proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx);
if
(
oai_exit
)
break
;
if
(
oai_exit
)
break
;
// *****************************************
// TX processing for subframe n+4
// run PHY TX procedures the one after the other for all CCs to avoid race conditions
...
...
@@ -395,7 +395,7 @@ static void* eNB_thread_rxtx( void* param ) {
eNB_thread_rxtx_status
=
0
;
sprintf
(
thread_name
,
"RXn_TXnp4_%d
\n
"
,
&
eNB
->
proc
.
proc_rxtx
[
0
]
==
proc
?
0
:
1
);
sprintf
(
thread_name
,
"RXn_TXnp4_%d"
,
&
eNB
->
proc
.
proc_rxtx
[
0
]
==
proc
?
0
:
1
);
thread_top_init
(
thread_name
,
1
,
470000
,
500000
,
500000
);
pthread_setname_np
(
pthread_self
(),
"rxtx processing"
);
LOG_I
(
PHY
,
"thread rxtx created id=%ld
\n
"
,
syscall
(
__NR_gettid
));
...
...
@@ -407,9 +407,10 @@ static void* eNB_thread_rxtx( void* param ) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0
+
(
proc
->
subframe_rx
&
1
),
0
);
T
(
T_ENB_MASTER_TICK
,
T_INT
(
0
),
T_INT
(
proc
->
frame_rx
),
T_INT
(
proc
->
subframe_rx
));
printf
(
"Entering eNB_thread_rxtx, proc0->cond_rxtx, instance_cnt_rxtx, frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
//printf("Entering eNB_thread_rxtx, proc0->cond_rxtx, instance_cnt_rxtx %d, frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d\n",
// proc->instance_cnt_rxtx,proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx);
if
(
wait_on_condition
(
&
proc
->
mutex_rxtx
,
&
proc
->
cond_rxtx
,
&
proc
->
instance_cnt_rxtx
,
thread_name
)
<
0
)
break
;
printf
(
"Passed eNB_thread_rxtx proc0->cond_rxtx , frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
//
printf("Passed eNB_thread_rxtx proc0->cond_rxtx , frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d\n", proc->frame_rx,proc->subframe_rx,proc->frame_tx,proc->subframe_tx);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_CPUID_ENB_THREAD_RXTX
,
sched_getcpu
());
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_PROC_RXTX0
+
(
proc
->
subframe_rx
&
1
),
1
);
...
...
@@ -517,7 +518,7 @@ int wakeup_txfh(eNB_rxtx_proc_t *proc,PHY_VARS_eNB *eNB) {
exit_fun
(
"error locking mutex_eNB"
);
return
(
-
1
);
}
printf
(
"waking up for frame %d subframe %d for RU TX
\n
"
,
proc
->
frame_tx
,
proc
->
subframe_tx
);
//
printf("waking up for frame %d subframe %d for RU TX \n", proc->frame_tx, proc->subframe_tx);
++
ru_proc
->
instance_cnt_eNBs
;
ru_proc
->
timestamp_tx
=
proc
->
timestamp_tx
;
ru_proc
->
subframe_tx
=
proc
->
subframe_tx
;
...
...
@@ -576,7 +577,7 @@ if ((fp->frame_type == TDD) && (subframe_select(fp,proc_rxtx0->subframe_tx)==SF_
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
}
printf
(
"Sent wakeup_tx proc1->cond_rxtx to tx_thread, frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d
\n
"
,
proc_rxtx1
->
frame_rx
,
proc_rxtx1
->
subframe_rx
,
proc_rxtx1
->
frame_tx
,
proc_rxtx1
->
subframe_tx
);
//
printf("Sent wakeup_tx proc1->cond_rxtx to tx_thread, frame_rx %d, subframe_rx %d, frame_tx %d, subframe_tx %d\n", proc_rxtx1->frame_rx,proc_rxtx1->subframe_rx,proc_rxtx1->frame_tx,proc_rxtx1->subframe_tx);
pthread_mutex_unlock
(
&
proc_rxtx1
->
mutex_rxtx
);
return
(
0
);
...
...
@@ -622,12 +623,12 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
printf
(
"Entering wakeup_rxtx, cond_rxtx, proc0->pipe_ready, frame %d, subframe %d
\n
"
,
proc_rxtx0
->
frame_rx
,
proc_rxtx0
->
subframe_rx
,
proc_rxtx0
->
frame_tx
,
proc_rxtx0
->
subframe_t
x
);
//printf("Entering wakeup_rxtx, cond_rxtx, proc0->pipe_ready %d, frame %d, subframe %d\n", proc_rxtx0->pipe_ready,proc_rxtx0->frame_rx,proc_rxtx0->subframe_r
x);
if
(
wait_on_condition
(
&
proc_rxtx0
->
mutex_rxtx
,
&
proc_rxtx0
->
cond_rxtx
,
&
proc_rxtx0
->
pipe_ready
,
"wakeup_rxtx"
)
<
0
)
{
LOG_E
(
PHY
,
"Frame %d, subframe %d: RXTX0 not ready
\n
"
,
proc_rxtx0
->
frame_rx
,
proc_rxtx0
->
subframe_rx
);
return
(
-
1
);
}
printf
(
"Passed wakeup_rxtx proc0->cond_rxtx, frame %d, subframe %d
\n
"
,
proc_rxtx0
->
frame_rx
,
proc_rxtx0
->
subframe_rx
,
proc_rxtx0
->
frame_tx
,
proc_rxtx0
->
subframe_t
x
);
//printf("Passed wakeup_rxtx proc0->cond_rxtx, frame %d, subframe %d\n", proc_rxtx0->frame_rx,proc_rxtx0->subframe_r
x);
if
(
release_thread
(
&
proc_rxtx0
->
mutex_rxtx
,
&
proc_rxtx0
->
pipe_ready
,
"wakeup_rxtx"
)
<
0
)
return
(
-
1
);
if
(
proc_rxtx0
->
instance_cnt_rxtx
==
0
)
{
...
...
@@ -664,7 +665,7 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
}
printf
(
"Sent wakeup_rxtx proc0->cond_rxtx to eNB_thread_rxtx, frame %d, subframe %d
\n
"
,
proc_rxtx0
->
frame_rx
,
proc_rxtx0
->
subframe_rx
,
proc_rxtx0
->
frame_tx
,
proc_rxtx0
->
subframe_t
x
);
//printf("Sent wakeup_rxtx proc0->cond_rxtx to eNB_thread_rxtx, frame %d, subframe %d\n", proc_rxtx0->frame_rx,proc_rxtx0->subframe_r
x);
pthread_mutex_unlock
(
&
proc_rxtx0
->
mutex_rxtx
);
return
(
0
);
...
...
@@ -997,10 +998,12 @@ void init_eNB_proc(int inst) {
LOG_I
(
PHY
,
"eNB->single_thread_flag:%d
\n
"
,
eNB
->
single_thread_flag
);
LOG_I
(
PHY
,
"proc_rxtx[0]->instance_cnt_rxtx %d,proc_rxtx[1]->instance_cnt_rxtx %d
\n
"
,
proc_rxtx
[
0
].
instance_cnt_rxtx
,
proc_rxtx
[
1
].
instance_cnt_rxtx
);
if
((
get_thread_parallel_conf
()
==
PARALLEL_RU_L1_SPLIT
||
get_thread_parallel_conf
()
==
PARALLEL_RU_L1_TRX_SPLIT
)
&&
nfapi_mode
!=
2
)
{
pthread_create
(
&
proc_rxtx
[
0
].
pthread_rxtx
,
attr0
,
eNB_thread_rxtx
,
proc
);
pthread_create
(
&
proc_rxtx
[
1
].
pthread_rxtx
,
attr1
,
tx_thread
,
proc
);
pthread_create
(
&
proc_rxtx
[
0
].
pthread_rxtx
,
attr0
,
eNB_thread_rxtx
,
eNB
);
pthread_create
(
&
proc_rxtx
[
1
].
pthread_rxtx
,
attr1
,
tx_thread
,
eNB
);
}
pthread_create
(
&
proc
->
pthread_prach
,
attr_prach
,
eNB_thread_prach
,
eNB
);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
...
...
targets/RT/USER/lte-ru.c
View file @
c8cef9e1
...
...
@@ -1140,7 +1140,7 @@ void wakeup_eNBs(RU_t *ru) {
RU_proc_t
*
ruproc
=
&
ru
->
proc
;
struct
timespec
t
;
LOG_
I
(
PHY
,
"wakeup_eNBs (num %d) for RU %d (state %s)ru->eNB_top:%p
\n
"
,
ru
->
num_eNB
,
ru
->
idx
,
ru_states
[
ru
->
state
],
ru
->
eNB_top
);
LOG_
D
(
PHY
,
"wakeup_eNBs (num %d) for RU %d (state %s)ru->eNB_top:%p
\n
"
,
ru
->
num_eNB
,
ru
->
idx
,
ru_states
[
ru
->
state
],
ru
->
eNB_top
);
if
(
ru
->
num_eNB
==
1
&&
ru
->
eNB_top
!=
0
&&
get_thread_parallel_conf
()
==
PARALLEL_SINGLE_THREAD
)
{
// call eNB function directly
...
...
@@ -1745,7 +1745,7 @@ static void* ru_thread( void* param ) {
}
else
{
LOG_
I
(
PHY
,
"RU thread %d, frame %d, subframe %d
\n
"
,
LOG_
D
(
PHY
,
"RU thread %d, frame %d, subframe %d
\n
"
,
ru
->
idx
,
frame
,
subframe
);
if
((
ru
->
do_prach
>
0
)
&&
(
is_prach_subframe
(
fp
,
proc
->
frame_rx
,
proc
->
subframe_rx
)
==
1
))
{
...
...
@@ -1880,7 +1880,7 @@ void *ru_thread_synch(void *arg) {
ru
->
rx_offset
=
ru_sync_time
(
ru
,
&
peak_val
,
&
avg
);
LOG_I
(
PHY
,
"RU synch cnt %d: %d, val %
d
\n
"
,
cnt
,
ru
->
rx_offset
,
peak_val
);
LOG_I
(
PHY
,
"RU synch cnt %d: %d, val %
llu
\n
"
,
cnt
,
ru
->
rx_offset
,(
unsigned
long
long
)
peak_val
);
cnt
++
;
if
(
ru
->
rx_offset
>=
0
&&
cnt
>
100
)
{
...
...
@@ -2680,7 +2680,7 @@ void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t ti
// LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],eNB_timing[ru->if_timing],ru->function);
set_function_spec_param
(
ru
);
LOG_I
(
PHY
,
"Starting ru_thread %d, is_slave %d, send_dmrs %d
\n
"
,
ru_id
,
ru
->
is_slave
,
ru
->
dmrs
sync
);
LOG_I
(
PHY
,
"Starting ru_thread %d, is_slave %d, send_dmrs %d
\n
"
,
ru_id
,
ru
->
is_slave
,
ru
->
generate_dmrs_
sync
);
init_RU_proc
(
ru
);
...
...
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