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
b7908ec2
Commit
b7908ec2
authored
Oct 08, 2019
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixies
parent
edb74831
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
70 additions
and
39 deletions
+70
-39
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-2
openair1/PHY/CODING/lte_segmentation.c
openair1/PHY/CODING/lte_segmentation.c
+1
-1
openair1/PHY/LTE_TRANSPORT/uci_tools.c
openair1/PHY/LTE_TRANSPORT/uci_tools.c
+3
-1
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+1
-2
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
+2
-2
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
+2
-2
openair1/SCHED_UE/phy_procedures_lte_ue.c
openair1/SCHED_UE/phy_procedures_lte_ue.c
+14
-11
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
+1
-1
openair2/PHY_INTERFACE/IF_Module.c
openair2/PHY_INTERFACE/IF_Module.c
+3
-3
openair2/UTIL/OPT/probe.c
openair2/UTIL/OPT/probe.c
+6
-2
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+1
-1
targets/ARCH/rfsimulator/stored_node.c
targets/ARCH/rfsimulator/stored_node.c
+30
-6
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+3
-4
No files found.
cmake_targets/CMakeLists.txt
View file @
b7908ec2
...
...
@@ -183,8 +183,8 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
#########################
# set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS
}
-g -DMALLOC_CHECK_=3"
)
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS
}
-g -DMALLOC_CHECK_=3 -O2"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS
}
-g
3
-DMALLOC_CHECK_=3"
)
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS
}
-g
3
-DMALLOC_CHECK_=3 -O2"
)
set
(
GIT_BRANCH
"UNKNOWN"
)
...
...
openair1/PHY/CODING/lte_segmentation.c
View file @
b7908ec2
...
...
@@ -105,7 +105,7 @@ int lte_segmentation(unsigned char *input_buffer,
#endif
*
Kminus
=
(
*
Kplus
-
64
);
}
else
{
printf
(
"lte_segmentation.c: Illegal codeword size !!!
\n
"
);
LOG_E
(
PHY
,
"lte_segmentation.c: Illegal codeword size !!!
\n
"
);
return
(
-
1
);
}
...
...
openair1/PHY/LTE_TRANSPORT/uci_tools.c
View file @
b7908ec2
...
...
@@ -49,7 +49,9 @@ int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_
else
if
((
eNB
->
uci_vars
[
i
].
active
==
0
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
}
if
(
type
==
SEARCH_EXIST
)
return
(
-
1
);
else
return
(
first_free_index
);
if
(
first_free_index
==-
1
)
LOG_E
(
MAC
,
"UCI table is full
\n
"
);
return
(
first_free_index
);
}
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
b7908ec2
...
...
@@ -584,8 +584,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
printf
(
"Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, nb_rb %d, Nl %d)...
\n
"
,
r
,
G
,
Kr
*
3
,
Q_m
,
nb_rb
,
ulsch_harq
->
Qm
,
ulsch_harq
->
Nl
);
#endif
start_meas
(
&
eNB
->
ulsch_rate_unmatching_stats
);
...
...
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
View file @
b7908ec2
...
...
@@ -590,10 +590,10 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
LOG_I
(
PHY
,
"[UE%d] Initial sync : Estimated power: %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
measurements
.
rx_power_avg_dB
[
0
]
);
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
if
(
IS_SOFTMODEM_BASICSIM
)
phy_adjust_gain
(
ue
,
ue
->
measurements
.
rx_power_avg_dB
[
0
],
0
);
}
else
{
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
if
(
IS_SOFTMODEM_BASICSIM
)
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
}
...
...
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
View file @
b7908ec2
...
...
@@ -80,7 +80,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
int
i
,
prach_len
;
uint16_t
first_nonzero_root_idx
=
0
;
if
(
!
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
)
{
if
(
!
(
IS_SOFTMODEM_BASICSIM
)
)
{
prach_start
=
(
ue
->
rx_offset
+
subframe
*
ue
->
frame_parms
.
samples_per_tti
-
ue
->
hw_timing_advance
-
ue
->
N_TA_offset
);
#ifdef PRACH_DEBUG
LOG_I
(
PHY
,
"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d
\n
"
,
ue
->
Mod_id
,
...
...
@@ -473,7 +473,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
AssertFatal
(
prach_fmt
<
4
,
"prach_fmt4 not fully implemented"
);
if
(
!
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
)
{
if
(
!
(
IS_SOFTMODEM_BASICSIM
)
)
{
int
j
;
int
overflow
=
prach_start
+
prach_len
-
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
ue
->
frame_parms
.
samples_per_tti
;
LOG_I
(
PHY
,
"prach_start=%d, overflow=%d
\n
"
,
prach_start
,
overflow
);
...
...
openair1/SCHED_UE/phy_procedures_lte_ue.c
View file @
b7908ec2
...
...
@@ -166,13 +166,16 @@ unsigned int get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb_rb
int
gain_dB
;
double
gain_lin
;
if
(
power_dBm
<=
power_max_dBm
)
if
(
(
power_dBm
<=
power_max_dBm
)
&&
!
IS_SOFTMODEM_RFSIM
)
gain_dB
=
power_dBm
-
power_max_dBm
;
else
gain_dB
=
0
;
gain_lin
=
pow
(
10
,.
1
*
gain_dB
);
AssertFatal
((
nb_rb
>
0
)
&&
(
nb_rb
<=
N_RB_UL
),
"Illegal nb_rb/N_RB_UL combination (%d/%d)
\n
"
,
nb_rb
,
N_RB_UL
);
LOG_D
(
PHY
,
" tx gain: %d = %d * sqrt ( pow(10, 0.1*max(0,%d-%d)) * %d/%d ) (gain lin=%f (dB=%d))
\n
"
,
(
int
)(
AMP
*
sqrt
(
gain_lin
*
N_RB_UL
/
(
double
)
nb_rb
)),
AMP
,
power_dBm
,
power_max_dBm
,
N_RB_UL
,
nb_rb
,
gain_lin
,
gain_dB
);
return
((
int
)(
AMP
*
sqrt
(
gain_lin
*
N_RB_UL
/
(
double
)
nb_rb
)));
}
...
...
@@ -1099,7 +1102,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
nsymb
=
(
frame_parms
->
Ncp
==
0
)
?
14
:
12
;
if
(
!
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
)
{
if
(
!
IS_SOFTMODEM_BASICSIM
)
{
ulsch_start
=
(
ue
->
rx_offset
+
subframe_tx
*
frame_parms
->
samples_per_tti
-
ue
->
hw_timing_advance
-
ue
->
timing_advance
-
...
...
@@ -1130,7 +1133,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
}
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
int
*
Buff
=
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
?
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
]
:
dummy_tx_buffer
;
int
*
Buff
=
IS_SOFTMODEM_BASICSIM
?
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
]
:
dummy_tx_buffer
;
if
(
frame_parms
->
Ncp
==
1
)
{
PHY_ofdm_mod
(
&
ue
->
common_vars
.
txdataF
[
aa
][
subframe_tx
*
nsymb
*
frame_parms
->
ofdm_symbol_size
],
...
...
@@ -1151,7 +1154,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
&
ue
->
frame_parms
);
}
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
apply_7_5_kHz
(
ue
,
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
0
);
apply_7_5_kHz
(
ue
,
&
ue
->
common_vars
.
txdata
[
aa
][
ulsch_start
],
1
);
}
else
{
...
...
@@ -1159,7 +1162,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
apply_7_5_kHz
(
ue
,
dummy_tx_buffer
,
1
);
}
if
(
!
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
)
{
if
(
!
(
IS_SOFTMODEM_BASICSIM
)
)
{
overflow
=
ulsch_start
-
9
*
frame_parms
->
samples_per_tti
;
for
(
k
=
ulsch_start
,
l
=
0
;
k
<
cmin
(
frame_parms
->
samples_per_tti
*
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
,
ulsch_start
+
frame_parms
->
samples_per_tti
);
k
++
,
l
++
)
{
...
...
@@ -1259,7 +1262,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
prach_resources
[
eNB_id
]
->
ra_RNTI
);
ue
->
tx_total_RE
[
subframe_tx
]
=
96
;
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
ue
->
prach_vars
[
eNB_id
]
->
amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
],
ue
->
tx_power_max_dBm
,
ue
->
frame_parms
.
N_RB_UL
,
...
...
@@ -1630,7 +1633,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue
->
tx_total_RE
[
subframe_tx
]
=
nb_rb
*
12
;
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
tx_amp
=
AMP
;
}
else
{
tx_amp
=
get_tx_amp
(
ue
->
tx_power_dBm
[
subframe_tx
],
...
...
@@ -1704,7 +1707,7 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8
Po_SRS
=
ue
->
tx_power_max_dBm
;
}
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
tx_amp
=
AMP
;
}
else
{
if
(
ue
->
mac_enabled
==
1
)
{
...
...
@@ -1942,7 +1945,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
tx_power_dBm
[
subframe_tx
]
=
Po_PUCCH
;
ue
->
tx_total_RE
[
subframe_tx
]
=
12
;
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
tx_amp
=
AMP
;
}
else
{
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
...
...
@@ -2023,7 +2026,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
tx_power_dBm
[
subframe_tx
]
=
Po_PUCCH
;
ue
->
tx_total_RE
[
subframe_tx
]
=
12
;
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
{
if
(
IS_SOFTMODEM_BASICSIM
)
{
tx_amp
=
AMP
;
}
else
{
tx_amp
=
get_tx_amp
(
Po_PUCCH
,
...
...
@@ -2269,7 +2272,7 @@ void ue_measurement_procedures(
// AGC
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_IN
);
if
(
IS_SOFTMODEM_BASICSIM
||
IS_SOFTMODEM_RFSIM
)
if
(
IS_SOFTMODEM_BASICSIM
)
phy_adjust_gain
(
ue
,
dB_fixed
(
ue
->
measurements
.
rssi
),
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL
,
VCD_FUNCTION_OUT
);
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
b7908ec2
...
...
@@ -1506,7 +1506,7 @@ schedule_ue_spec(module_id_t module_idP,
tpc
=
1
;
//0
}
LOG_D
(
MAC
,
"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d
\n
"
,
LOG_D
(
MAC
,
"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d
(normal case)
\n
"
,
module_idP
,
frameP
,
subframeP
,
...
...
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
View file @
b7908ec2
...
...
@@ -2836,7 +2836,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
}
if
(
tpc
!=
1
)
{
LOG_D
(
MAC
,
"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d
\n
"
,
LOG_D
(
MAC
,
"[eNB %d] ULSCH scheduler
RR
: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d
\n
"
,
module_idP
,
frameP
,
subframeP
,
harq_pid
,
tpc
,
tpc_accumulated
,
snr
,
target_snr
);
}
...
...
openair2/PHY_INTERFACE/IF_Module.c
View file @
b7908ec2
...
...
@@ -388,10 +388,10 @@ static void dump_ul(UL_IND_t *u) {
A
(
"XXXX crc_ind %d
\n
"
,
u
->
crc_ind
.
crc_indication_body
.
number_of_crcs
);
A
(
"XXXX sr_ind %d
\n
"
,
u
->
sr_ind
.
sr_indication_body
.
number_of_srs
);
A
(
"XXXX cqi_ind %d
\n
"
,
u
->
cqi_ind
.
number_of_cqis
);
A
(
"XXXX cqi_ind %d
\n
"
,
u
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
);
for
(
i
=
0
;
i
<
u
->
cqi_ind
.
number_of_cqis
;
i
++
)
{
nfapi_cqi_indication_pdu_t
*
v
=
&
u
->
cqi_ind
.
cqi_pdu_list
[
i
];
for
(
i
=
0
;
i
<
u
->
cqi_ind
.
cqi_indication_body
.
number_of_cqis
;
i
++
)
{
nfapi_cqi_indication_pdu_t
*
v
=
&
u
->
cqi_ind
.
cqi_
indication_body
.
cqi_
pdu_list
[
i
];
A
(
"XXXX cqi ind %d
\n
"
,
i
);
A
(
"XXXX cqi ul_cqi %d channel %d
\n
"
,
v
->
ul_cqi_information
.
ul_cqi
,
v
->
ul_cqi_information
.
channel
);
...
...
openair2/UTIL/OPT/probe.c
View file @
b7908ec2
...
...
@@ -396,11 +396,15 @@ void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
MAC_Context_Info_t
pdu_context
;
int
radioType
=
FDD_RADIO
;
if
(
RC
.
eNB
[
0
][
0
]
!=
NULL
)
if
(
RC
.
eNB
&&
RC
.
eNB
[
0
][
0
]
!=
NULL
)
radioType
=
RC
.
eNB
[
0
][
0
]
->
frame_parms
.
frame_type
==
FDD
?
FDD_RADIO
:
TDD_RADIO
;
if
(
PHY_vars_UE_g
[
0
][
0
]
!=
NULL
)
else
if
(
PHY_vars_UE_g
&&
PHY_vars_UE_g
[
0
][
0
]
!=
NULL
)
radioType
=
PHY_vars_UE_g
[
0
][
0
]
->
frame_parms
.
frame_type
==
FDD
?
FDD_RADIO
:
TDD_RADIO
;
else
{
LOG_E
(
OPT
,
"not a eNB neither a UE!!!
\n
"
);
return
;
}
switch
(
opt_type
)
{
case
OPT_WIRESHARK
:
...
...
targets/ARCH/rfsimulator/simulator.c
View file @
b7908ec2
...
...
@@ -430,7 +430,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
b
->
circularBuf
[(
index
*
nbAnt
+
a
)
%
CirSize
].
i
=
0
;
}
}
if
(
abs
(
b
->
th
.
timestamp
-
b
->
lastReceivedTS
)
>
50
)
LOG_W
(
HW
,
"gap of: %ld in reception
\n
"
,
b
->
th
.
timestamp
-
b
->
lastReceivedTS
);
}
...
...
targets/ARCH/rfsimulator/stored_node.c
View file @
b7908ec2
...
...
@@ -7,6 +7,21 @@
volatile
int
oai_exit
=
0
;
int
fullread
(
int
fd
,
void
*
_buf
,
int
count
)
{
char
*
buf
=
_buf
;
int
ret
=
0
;
int
l
;
while
(
count
)
{
l
=
read
(
fd
,
buf
,
count
);
if
(
l
<=
0
)
return
-
1
;
count
-=
l
;
buf
+=
l
;
ret
+=
l
;
}
return
ret
;
}
void
fullwrite
(
int
fd
,
void
*
_buf
,
int
count
)
{
char
*
buf
=
_buf
;
int
l
;
...
...
@@ -63,10 +78,10 @@ sin_addr:
bool
connected
=
false
;
while
(
!
connected
)
{
LOG_I
(
HW
,
"rfsimulator: trying to connect to %s:%d
\n
"
,
IP
,
port
);
//
LOG_I(HW,"rfsimulator: trying to connect to %s:%d\n", IP, port);
if
(
connect
(
sock
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
))
==
0
)
{
LOG_I
(
HW
,
"rfsimulator: connection established
\n
"
);
//
LOG_I(HW,"rfsimulator: connection established\n");
connected
=
true
;
}
...
...
@@ -108,12 +123,13 @@ int main(int argc, char *argv[]) {
if
(
strcmp
(
argv
[
2
],
"server"
)
==
0
)
{
serviceSock
=
server_start
(
atoi
(
argv
[
3
]));
}
else
{
client_start
(
argv
[
2
],
atoi
(
argv
[
3
]));
serviceSock
=
client_start
(
argv
[
2
],
atoi
(
argv
[
3
]));
}
samplesBlockHeader_t
header
;
int
bufSize
=
100000
;
void
*
buff
=
malloc
(
bufSize
);
uint64_t
readTS
=
0
;
while
(
1
)
{
//Rewind the file to loop on the samples
...
...
@@ -125,6 +141,7 @@ int main(int argc, char *argv[]) {
AssertFatal
(
read
(
fd
,
&
header
,
sizeof
(
header
)),
""
);
fullwrite
(
serviceSock
,
&
header
,
sizeof
(
header
));
int
dataSize
=
sizeof
(
int32_t
)
*
header
.
size
*
header
.
nbAnt
;
uint64_t
wroteTS
=
header
.
timestamp
;
if
(
dataSize
>
bufSize
)
{
void
*
new_buff
=
realloc
(
buff
,
dataSize
);
...
...
@@ -139,9 +156,16 @@ int main(int argc, char *argv[]) {
AssertFatal
(
read
(
fd
,
buff
,
dataSize
)
==
dataSize
,
""
);
fullwrite
(
serviceSock
,
buff
,
dataSize
);
// Purge incoming samples
setblocking
(
serviceSock
,
notBlocking
);
while
(
recv
(
serviceSock
,
buff
,
bufSize
,
MSG_DONTWAIT
)
>
0
)
{
setblocking
(
serviceSock
,
blocking
);
while
(
readTS
<
wroteTS
)
{
if
(
fullread
(
serviceSock
,
&
header
,
sizeof
(
header
))
!=
sizeof
(
header
)
||
fullread
(
serviceSock
,
buff
,
sizeof
(
int32_t
)
*
header
.
size
*
header
.
nbAnt
)
!=
sizeof
(
int32_t
)
*
header
.
size
*
header
.
nbAnt
)
{
printf
(
"error: %s
\n
"
,
strerror
(
errno
));
exit
(
1
);
}
readTS
=
header
.
timestamp
;
}
}
...
...
targets/RT/USER/lte-ru.c
View file @
b7908ec2
...
...
@@ -1202,7 +1202,8 @@ void wakeup_L1s(RU_t *ru) {
ru
->
proc
.
emulate_rf_busy
=
0
;
}
inline
int
wakeup_prach_ru
(
RU_t
*
ru
)
{
void
wakeup_prach_ru
(
RU_t
*
ru
)
{
int
ret
;
struct
timespec
wait
;
int
time_ns
=
5000000L
;
...
...
@@ -1234,11 +1235,10 @@ inline int wakeup_prach_ru(RU_t *ru) {
}
else
LOG_W
(
PHY
,
"RU prach thread busy, skipping
\n
"
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
ru
->
proc
.
mutex_prach
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
return
(
0
);
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
inline
int
wakeup_prach_ru_br
(
RU_t
*
ru
)
{
void
wakeup_prach_ru_br
(
RU_t
*
ru
)
{
int
ret
;
struct
timespec
wait
;
int
time_ns
=
5000000L
;
...
...
@@ -1264,7 +1264,6 @@ inline int wakeup_prach_ru_br(RU_t *ru) {
}
else
LOG_W
(
PHY
,
"RU prach thread busy, skipping
\n
"
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
ru
->
proc
.
mutex_prach_br
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
return
(
0
);
}
#endif
...
...
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