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
Michael Black
OpenXG-RAN
Commits
03a2d3e1
Commit
03a2d3e1
authored
4 years ago
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bug-rfsim-and-warnings' into develop_integration_2020_w31
parents
1aa7d4b9
427b2231
Branches unavailable
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
2020.w34
2020.w33
2020.w31
setparam
flexran-eol
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
No related merge requests found
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
40 additions
and
24 deletions
+40
-24
cmake_targets/build_oai
cmake_targets/build_oai
+1
-0
common/utils/ocp_itti/intertask_interface.cpp
common/utils/ocp_itti/intertask_interface.cpp
+1
-1
common/utils/threadPool/thread-pool.c
common/utils/threadPool/thread-pool.c
+3
-2
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+2
-5
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+1
-1
openair1/PHY/TOOLS/readme.md
openair1/PHY/TOOLS/readme.md
+12
-0
openair1/PHY/phy_vars.h
openair1/PHY/phy_vars.h
+4
-4
openair1/PHY/phy_vars_nr_ue.h
openair1/PHY/phy_vars_nr_ue.h
+1
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
openair2/ENB_APP/flexran_agent_extern.h
openair2/ENB_APP/flexran_agent_extern.h
+0
-2
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+1
-1
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
+2
-2
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+0
-1
targets/ARCH/rfsimulator/simulator.c
targets/ARCH/rfsimulator/simulator.c
+10
-2
No files found.
cmake_targets/build_oai
View file @
03a2d3e1
...
@@ -580,6 +580,7 @@ function main() {
...
@@ -580,6 +580,7 @@ function main() {
cmake_file
=
$DIR
/
$build_dir
/CMakeLists.txt
cmake_file
=
$DIR
/
$build_dir
/CMakeLists.txt
echo
"cmake_minimum_required(VERSION 2.8)"
>
$cmake_file
echo
"cmake_minimum_required(VERSION 2.8)"
>
$cmake_file
echo
"project (OpenAirInterface)"
>>
$cmake_file
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
echo
"set ( CMAKE_BUILD_TYPE
$CMAKE_BUILD_TYPE
)"
>>
$cmake_file
echo
"set ( CFLAGS_PROCESSOR_USER
\"
$CFLAGS_PROCESSOR_USER
\"
)"
>>
$cmake_file
echo
"set ( CFLAGS_PROCESSOR_USER
\"
$CFLAGS_PROCESSOR_USER
\"
)"
>>
$cmake_file
echo
"set ( UE_EXPANSION
$UE_EXPANSION
)"
>>
$cmake_file
echo
"set ( UE_EXPANSION
$UE_EXPANSION
)"
>>
$cmake_file
...
...
This diff is collapsed.
Click to expand it.
common/utils/ocp_itti/intertask_interface.cpp
View file @
03a2d3e1
...
@@ -80,7 +80,7 @@ task_list_t tasks[TASK_MAX];
...
@@ -80,7 +80,7 @@ task_list_t tasks[TASK_MAX];
void
*
itti_malloc
(
task_id_t
origin_task_id
,
task_id_t
destination_task_id
,
ssize_t
size
)
{
void
*
itti_malloc
(
task_id_t
origin_task_id
,
task_id_t
destination_task_id
,
ssize_t
size
)
{
void
*
ptr
=
NULL
;
void
*
ptr
=
NULL
;
AssertFatal
((
ptr
=
malloc
(
size
))
!=
NULL
,
"Memory allocation of %zu bytes failed (%d -> %d)!
\n
"
,
AssertFatal
((
ptr
=
calloc
(
size
,
1
))
!=
NULL
,
"Memory allocation of %zu bytes failed (%d -> %d)!
\n
"
,
size
,
origin_task_id
,
destination_task_id
);
size
,
origin_task_id
,
destination_task_id
);
return
ptr
;
return
ptr
;
}
}
...
...
This diff is collapsed.
Click to expand it.
common/utils/threadPool/thread-pool.c
View file @
03a2d3e1
...
@@ -111,9 +111,10 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
...
@@ -111,9 +111,10 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
pool
->
activated
=
true
;
pool
->
activated
=
true
;
initNotifiedFIFO
(
&
pool
->
incomingFifo
);
initNotifiedFIFO
(
&
pool
->
incomingFifo
);
char
*
saveptr
,
*
curptr
;
char
*
saveptr
,
*
curptr
;
char
*
parms_cpy
=
strdup
(
params
);
pool
->
nbThreads
=
0
;
pool
->
nbThreads
=
0
;
pool
->
restrictRNTI
=
false
;
pool
->
restrictRNTI
=
false
;
curptr
=
strtok_r
(
par
ams
,
","
,
&
saveptr
);
curptr
=
strtok_r
(
par
ms_cpy
,
","
,
&
saveptr
);
struct
one_thread
*
ptr
;
struct
one_thread
*
ptr
;
while
(
curptr
!=
NULL
)
{
while
(
curptr
!=
NULL
)
{
int
c
=
toupper
(
curptr
[
0
]);
int
c
=
toupper
(
curptr
[
0
]);
...
@@ -145,7 +146,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
...
@@ -145,7 +146,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
curptr
=
strtok_r
(
NULL
,
","
,
&
saveptr
);
curptr
=
strtok_r
(
NULL
,
","
,
&
saveptr
);
}
}
free
(
parms_cpy
);
if
(
pool
->
activated
&&
pool
->
nbThreads
==
0
)
{
if
(
pool
->
activated
&&
pool
->
nbThreads
==
0
)
{
printf
(
"No servers created in the thread pool, exit
\n
"
);
printf
(
"No servers created in the thread pool, exit
\n
"
);
exit
(
1
);
exit
(
1
);
...
...
This diff is collapsed.
Click to expand it.
executables/nr-uesoftmodem.c
View file @
03a2d3e1
...
@@ -76,12 +76,9 @@ unsigned short config_frames[4] = {2,9,11,13};
...
@@ -76,12 +76,9 @@ unsigned short config_frames[4] = {2,9,11,13};
#include <openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h>
#include <openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h>
#include <openair1/SCHED_NR_UE/fapi_nr_ue_l1.h>
#include <openair1/SCHED_NR_UE/fapi_nr_ue_l1.h>
//#include "stats.h"
/* Callbacks, globals and object handlers */
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
#include "PHY/TOOLS/nr_phy_scope.h"
// at eNB 0, an UL scope for every UE
//FD_lte_phy_scope_enb *form_enb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
#include "PHY/TOOLS/nr_phy_scope.h"
#include <executables/nr-uesoftmodem.h>
#include <executables/nr-uesoftmodem.h>
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "executables/thread-common.h"
#include "executables/thread-common.h"
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
View file @
03a2d3e1
...
@@ -55,7 +55,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
...
@@ -55,7 +55,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
uint8_t
preamble_index
=
ue
->
prach_resources
[
eNB_id
]
->
ra_PreambleIndex
;
uint8_t
preamble_index
=
ue
->
prach_resources
[
eNB_id
]
->
ra_PreambleIndex
;
uint8_t
tdd_mapindex
=
ue
->
prach_resources
[
eNB_id
]
->
ra_TDD_map_index
;
uint8_t
tdd_mapindex
=
ue
->
prach_resources
[
eNB_id
]
->
ra_TDD_map_index
;
int16_t
*
prachF
=
ue
->
prach_vars
[
eNB_id
]
->
prachF
;
int16_t
*
prachF
=
ue
->
prach_vars
[
eNB_id
]
->
prachF
;
static
int16_t
prach_tmp
[
45600
*
2
]
__attribute__
((
aligned
(
32
)));
static
int16_t
prach_tmp
[
45600
*
4
]
__attribute__
((
aligned
(
32
)));
int16_t
*
prach
=
prach_tmp
;
int16_t
*
prach
=
prach_tmp
;
int16_t
*
prach2
;
int16_t
*
prach2
;
int16_t
amp
=
ue
->
prach_vars
[
eNB_id
]
->
amp
;
int16_t
amp
=
ue
->
prach_vars
[
eNB_id
]
->
amp
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
03a2d3e1
...
@@ -540,7 +540,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
...
@@ -540,7 +540,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
uint16_t
rootSequenceIndex
;
uint16_t
rootSequenceIndex
;
int
numrootSequenceIndex
;
int
numrootSequenceIndex
;
uint8_t
restricted_set
;
uint8_t
restricted_set
;
uint8_t
n_ra_prb
;
uint8_t
n_ra_prb
=
0xFF
;
int16_t
*
prachF
=
NULL
;
int16_t
*
prachF
=
NULL
;
int
nb_rx
;
int
nb_rx
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/readme.md
0 → 100644
View file @
03a2d3e1
To use the scope, run the xNB or the UE with option "-d"
Usage in gdb
In gdb, when you break, you can refresh immediatly the scope view by calling the display function.
The first paramter is the graph context, nevertheless we keep the last value for a dirty call in gdb (so you can use '0')
Example with no variable known
phy_scope_nrUE(0, PHY_vars_UE_g
[
0
][
0
]
, 0, 0, 0)
or
phy_scope_gNB(0, phy_vars_gnb, phy_vars_ru, UE_id)
This diff is collapsed.
Click to expand it.
openair1/PHY/phy_vars.h
View file @
03a2d3e1
...
@@ -59,10 +59,10 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
...
@@ -59,10 +59,10 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
unsigned
char
NB_RU
=
0
;
unsigned
char
NB_RU
=
0
;
#ifndef OPENAIR2
#ifndef OPENAIR2
unsigned
char
NB_eNB_INST
=
0
;
//
unsigned char NB_eNB_INST=0;
uint16_t
NB_UE_INST
=
0
;
//
uint16_t NB_UE_INST=0;
unsigned
char
NB_RN_INST
=
0
;
//
unsigned char NB_RN_INST=0;
unsigned
char
NB_INST
=
0
;
//
unsigned char NB_INST=0;
#endif
#endif
int
number_of_cards
;
int
number_of_cards
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/phy_vars_nr_ue.h
View file @
03a2d3e1
...
@@ -138,4 +138,4 @@ uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
...
@@ -138,4 +138,4 @@ uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
uint8_t
max_ldpc_iterations
=
4
;
uint8_t
max_ldpc_iterations
=
4
;
uint8_t
max_turbo_iterations
=
4
;
uint8_t
max_turbo_iterations
=
4
;
#endif
/*__PHY_VARS_H__ */
#endif
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
03a2d3e1
...
@@ -424,7 +424,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -424,7 +424,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_NR_ULSCH_MAX
;
ULSCH_id
++
)
{
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ULSCH_id
][
0
];
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
ULSCH_id
][
0
];
int
harq_pid
;
int
harq_pid
;
int
no_sig
;
//
int no_sig;
NR_UL_gNB_HARQ_t
*
ulsch_harq
;
NR_UL_gNB_HARQ_t
*
ulsch_harq
;
if
((
ulsch
)
&&
if
((
ulsch
)
&&
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/flexran_agent_extern.h
View file @
03a2d3e1
...
@@ -44,8 +44,6 @@ AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id);
...
@@ -44,8 +44,6 @@ AGENT_PHY_xface *flexran_agent_get_phy_xface(mid_t mod_id);
extern
AGENT_MAC_xface
*
agent_mac_xface
[
NUM_MAX_ENB
];
extern
AGENT_MAC_xface
*
agent_mac_xface
[
NUM_MAX_ENB
];
#define flexran_agent_get_mac_xface(mod_id) (agent_mac_xface[mod_id])
#define flexran_agent_get_mac_xface(mod_id) (agent_mac_xface[mod_id])
/* Control module interface for the communication of the RRC Control Module with the agent */
/* Control module interface for the communication of the RRC Control Module with the agent */
/* Control module interface for the communication of the RRC Control Module with the agent */
// AGENT_RRC_xface *flexran_agent_get_rrc_xface(mid_t mod_id);
// AGENT_RRC_xface *flexran_agent_get_rrc_xface(mid_t mod_id);
extern
AGENT_RRC_xface
*
agent_rrc_xface
[
NUM_MAX_ENB
];
extern
AGENT_RRC_xface
*
agent_rrc_xface
[
NUM_MAX_ENB
];
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
03a2d3e1
...
@@ -360,7 +360,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -360,7 +360,7 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
uint8_t
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
uint16_t
sdu_lengths
[
NB_RB_MAX
]
=
{
0
};
uint16_t
sdu_lengths
[
NB_RB_MAX
]
=
{
0
};
int
TBS_bytes
=
848
,
header_length_total
,
num_sdus
,
offset
,
preambleTransMax
,
mac_ce_len
;
int
TBS_bytes
=
848
,
header_length_total
=
0
,
num_sdus
,
offset
,
preambleTransMax
,
mac_ce_len
;
AssertFatal
(
CC_id
==
0
,
"Transmission on secondary CCs is not supported yet
\n
"
);
AssertFatal
(
CC_id
==
0
,
"Transmission on secondary CCs is not supported yet
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
View file @
03a2d3e1
...
@@ -288,7 +288,7 @@ int ethernet_tune(openair0_device *device,
...
@@ -288,7 +288,7 @@ int ethernet_tune(openair0_device *device,
/******************* interface level options *************************/
/******************* interface level options *************************/
case
MTU_SIZE
:
/* change MTU of the eth interface */
case
MTU_SIZE
:
/* change MTU of the eth interface */
ifr
.
ifr_addr
.
sa_family
=
AF_INET
;
ifr
.
ifr_addr
.
sa_family
=
AF_INET
;
strncpy
(
ifr
.
ifr_name
,
eth
->
if_name
,
sizeof
(
ifr
.
ifr_name
));
strncpy
(
ifr
.
ifr_name
,
eth
->
if_name
,
sizeof
(
ifr
.
ifr_name
)
-
1
);
ifr
.
ifr_mtu
=
value
;
ifr
.
ifr_mtu
=
value
;
if
(
ioctl
(
eth
->
sockfdd
,
SIOCSIFMTU
,(
caddr_t
)
&
ifr
)
<
0
)
if
(
ioctl
(
eth
->
sockfdd
,
SIOCSIFMTU
,(
caddr_t
)
&
ifr
)
<
0
)
perror
(
"[ETHERNET] Can't set the MTU"
);
perror
(
"[ETHERNET] Can't set the MTU"
);
...
@@ -298,7 +298,7 @@ int ethernet_tune(openair0_device *device,
...
@@ -298,7 +298,7 @@ int ethernet_tune(openair0_device *device,
case
TX_Q_LEN
:
/* change TX queue length of eth interface */
case
TX_Q_LEN
:
/* change TX queue length of eth interface */
ifr
.
ifr_addr
.
sa_family
=
AF_INET
;
ifr
.
ifr_addr
.
sa_family
=
AF_INET
;
strncpy
(
ifr
.
ifr_name
,
eth
->
if_name
,
sizeof
(
ifr
.
ifr_name
));
strncpy
(
ifr
.
ifr_name
,
eth
->
if_name
,
sizeof
(
ifr
.
ifr_name
)
-
1
);
ifr
.
ifr_qlen
=
value
;
ifr
.
ifr_qlen
=
value
;
if
(
ioctl
(
eth
->
sockfdd
,
SIOCSIFTXQLEN
,(
caddr_t
)
&
ifr
)
<
0
)
if
(
ioctl
(
eth
->
sockfdd
,
SIOCSIFTXQLEN
,(
caddr_t
)
&
ifr
)
<
0
)
perror
(
"[ETHERNET] Can't set the txqueuelen"
);
perror
(
"[ETHERNET] Can't set the txqueuelen"
);
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
03a2d3e1
...
@@ -976,7 +976,6 @@ extern "C" {
...
@@ -976,7 +976,6 @@ extern "C" {
double
usrp_master_clock
;
double
usrp_master_clock
;
if
(
device_adds
[
0
].
get
(
"type"
)
==
"b200"
)
{
if
(
device_adds
[
0
].
get
(
"type"
)
==
"b200"
)
{
printf
(
"Found USRP b200
\n
"
);
device
->
type
=
USRP_B200_DEV
;
device
->
type
=
USRP_B200_DEV
;
usrp_master_clock
=
30.72e6
;
usrp_master_clock
=
30.72e6
;
args
+=
boost
::
str
(
boost
::
format
(
",master_clock_rate=%f"
)
%
usrp_master_clock
);
args
+=
boost
::
str
(
boost
::
format
(
",master_clock_rate=%f"
)
%
usrp_master_clock
);
...
...
This diff is collapsed.
Click to expand it.
targets/ARCH/rfsimulator/simulator.c
View file @
03a2d3e1
...
@@ -148,15 +148,18 @@ void allocCirBuf(rfsimulator_state_t *bridge, int sock) {
...
@@ -148,15 +148,18 @@ void allocCirBuf(rfsimulator_state_t *bridge, int sock) {
// Legacy changes directlty the variable channel_model->path_loss_dB place to place
// Legacy changes directlty the variable channel_model->path_loss_dB place to place
// while calling new_channel_desc_scm() with path losses = 0
// while calling new_channel_desc_scm() with path losses = 0
static
bool
init_done
=
false
;
static
bool
init_done
=
false
;
if
(
!
init_done
)
{
if
(
!
init_done
)
{
uint64_t
rand
;
uint64_t
rand
;
FILE
*
h
=
fopen
(
"/dev/random"
,
"r"
);
FILE
*
h
=
fopen
(
"/dev/random"
,
"r"
);
fread
(
&
rand
,
sizeof
(
rand
),
1
,
h
);
if
(
1
!=
fread
(
&
rand
,
sizeof
(
rand
),
1
,
h
)
)
LOG_W
(
HW
,
"Simulator can't read /dev/random
\n
"
);
fclose
(
h
);
fclose
(
h
);
randominit
(
rand
);
randominit
(
rand
);
tableNor
(
rand
);
tableNor
(
rand
);
init_done
=
true
;
init_done
=
true
;
}
}
ptr
->
channel_model
=
new_channel_desc_scm
(
bridge
->
tx_num_channels
,
bridge
->
rx_num_channels
,
ptr
->
channel_model
=
new_channel_desc_scm
(
bridge
->
tx_num_channels
,
bridge
->
rx_num_channels
,
bridge
->
channelmod
,
bridge
->
channelmod
,
bridge
->
sample_rate
,
bridge
->
sample_rate
,
...
@@ -379,6 +382,7 @@ static int rfsimulator_write_internal(rfsimulator_state_t *t, openair0_timestamp
...
@@ -379,6 +382,7 @@ static int rfsimulator_write_internal(rfsimulator_state_t *t, openair0_timestamp
if
(
t
->
lastWroteTS
>
timestamp
+
nsamps
)
if
(
t
->
lastWroteTS
>
timestamp
+
nsamps
)
LOG_E
(
HW
,
"Not supported to send Tx out of order (same in USRP) %lu, %lu
\n
"
,
LOG_E
(
HW
,
"Not supported to send Tx out of order (same in USRP) %lu, %lu
\n
"
,
t
->
lastWroteTS
,
timestamp
);
t
->
lastWroteTS
,
timestamp
);
t
->
lastWroteTS
=
timestamp
+
nsamps
;
t
->
lastWroteTS
=
timestamp
+
nsamps
;
if
(
!
alreadyLocked
)
if
(
!
alreadyLocked
)
...
@@ -480,6 +484,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
...
@@ -480,6 +484,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
b
->
trashingPacket
=
true
;
b
->
trashingPacket
=
true
;
}
else
if
(
b
->
lastReceivedTS
<
b
->
th
.
timestamp
)
{
}
else
if
(
b
->
lastReceivedTS
<
b
->
th
.
timestamp
)
{
int
nbAnt
=
b
->
th
.
nbAnt
;
int
nbAnt
=
b
->
th
.
nbAnt
;
if
(
b
->
th
.
timestamp
-
b
->
lastReceivedTS
<
CirSize
)
{
if
(
b
->
th
.
timestamp
-
b
->
lastReceivedTS
<
CirSize
)
{
for
(
uint64_t
index
=
b
->
lastReceivedTS
;
index
<
b
->
th
.
timestamp
;
index
++
)
{
for
(
uint64_t
index
=
b
->
lastReceivedTS
;
index
<
b
->
th
.
timestamp
;
index
++
)
{
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
for
(
int
a
=
0
;
a
<
nbAnt
;
a
++
)
{
...
@@ -490,8 +495,10 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
...
@@ -490,8 +495,10 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
}
else
{
}
else
{
memset
(
b
->
circularBuf
,
0
,
sampleToByte
(
CirSize
,
1
));
memset
(
b
->
circularBuf
,
0
,
sampleToByte
(
CirSize
,
1
));
}
}
if
(
b
->
lastReceivedTS
!=
0
&&
b
->
th
.
timestamp
-
b
->
lastReceivedTS
>
50
)
if
(
b
->
lastReceivedTS
!=
0
&&
b
->
th
.
timestamp
-
b
->
lastReceivedTS
>
50
)
LOG_W
(
HW
,
"UEsock: %d gap of: %ld in reception
\n
"
,
fd
,
b
->
th
.
timestamp
-
b
->
lastReceivedTS
);
LOG_W
(
HW
,
"UEsock: %d gap of: %ld in reception
\n
"
,
fd
,
b
->
th
.
timestamp
-
b
->
lastReceivedTS
);
b
->
lastReceivedTS
=
b
->
th
.
timestamp
;
b
->
lastReceivedTS
=
b
->
th
.
timestamp
;
}
else
if
(
b
->
lastReceivedTS
>
b
->
th
.
timestamp
&&
b
->
th
.
size
==
1
)
{
}
else
if
(
b
->
lastReceivedTS
>
b
->
th
.
timestamp
&&
b
->
th
.
size
==
1
)
{
...
@@ -510,7 +517,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
...
@@ -510,7 +517,7 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
LOG_E
(
HW
,
"UEsock: %d Tx/Rx shift too large Tx:%lu, Rx:%lu
\n
"
,
fd
,
t
->
lastWroteTS
,
b
->
lastReceivedTS
);
LOG_E
(
HW
,
"UEsock: %d Tx/Rx shift too large Tx:%lu, Rx:%lu
\n
"
,
fd
,
t
->
lastWroteTS
,
b
->
lastReceivedTS
);
pthread_mutex_unlock
(
&
Sockmutex
);
pthread_mutex_unlock
(
&
Sockmutex
);
b
->
transferPtr
=
(
char
*
)
&
b
->
circularBuf
[
b
->
lastReceivedTS
%
CirSize
];
b
->
transferPtr
=
(
char
*
)
&
b
->
circularBuf
[
(
b
->
lastReceivedTS
*
b
->
th
.
nbAnt
)
%
CirSize
];
b
->
remainToTransfer
=
sampleToByte
(
b
->
th
.
size
,
b
->
th
.
nbAnt
);
b
->
remainToTransfer
=
sampleToByte
(
b
->
th
.
size
,
b
->
th
.
nbAnt
);
}
}
...
@@ -653,6 +660,7 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
...
@@ -653,6 +660,7 @@ int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimestamp, vo
else
{
// no channel modeling
else
{
// no channel modeling
sample_t
*
out
=
(
sample_t
*
)
samplesVoid
[
a
];
sample_t
*
out
=
(
sample_t
*
)
samplesVoid
[
a
];
const
int64_t
base
=
t
->
nextTimestamp
*
nbAnt
+
a
;
const
int64_t
base
=
t
->
nextTimestamp
*
nbAnt
+
a
;
for
(
int
i
=
0
;
i
<
nsamps
;
i
++
)
{
for
(
int
i
=
0
;
i
<
nsamps
;
i
++
)
{
const
int
idx
=
(
i
*
nbAnt
+
base
)
%
CirSize
;
const
int
idx
=
(
i
*
nbAnt
+
base
)
%
CirSize
;
out
[
i
].
r
+=
ptr
->
circularBuf
[
idx
].
r
;
out
[
i
].
r
+=
ptr
->
circularBuf
[
idx
].
r
;
...
...
This diff is collapsed.
Click to expand it.
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