Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
1d8794a8
Commit
1d8794a8
authored
May 09, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PSS RX testing with USRP
parent
79b6e1d8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
22 deletions
+27
-22
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+2
-2
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+4
-2
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+13
-12
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+8
-6
No files found.
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
View file @
1d8794a8
...
...
@@ -651,7 +651,7 @@ int lte_sync_timeSL(PHY_VARS_UE *ue,
for
(
int
slot
=
0
;
slot
<
80
;
slot
++
)
{
remove_7_5_kHz
(
&
ru_tmp
,
slot
);
for
(
int
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
memcpy
((
void
*
)
&
rxdata
[
ar
][
slot
*
2
*
(
frame_parms
->
samples_per_tti
/
2
)],
memcpy
((
void
*
)
&
rxdata
[
ar
][
slot
*
(
frame_parms
->
samples_per_tti
/
2
)],
(
void
*
)
&
rxdata_7_5kHz
[
ar
][(
slot
&
1
)
*
2
*
(
frame_parms
->
samples_per_tti
/
2
)],
sizeof
(
int16_t
)
*
(
2
*
frame_parms
->
samples_per_tti
/
2
));
}
...
...
@@ -796,7 +796,7 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
}
}
mean_val
/=
length
;
mean_val
/=
(
length
/
4
);
*
peak_val_out
=
peak_val
;
...
...
targets/RT/USER/lte-softmodem.h
View file @
1d8794a8
...
...
@@ -276,8 +276,10 @@ extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
extern
void
init_te_thread
(
PHY_VARS_eNB
*
,
pthread_attr_t
*
);
PHY_VARS_UE
*
init_ue_vars
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
);
uint8_t
UE_id
,
uint8_t
abstraction_flag
,
int
sidelink_active
);
void
init_eNB_afterRU
(
void
);
extern
int
stop_L1L2
(
module_id_t
enb_id
);
...
...
targets/RT/USER/lte-ue.c
View file @
1d8794a8
...
...
@@ -80,7 +80,7 @@ void *UE_thread(void *arg);
void
*
UE_threadSL
(
void
*
arg
);
void
init_UE_stub
(
int
nb_inst
,
int
,
int
,
char
*
,
int
);
void
ue_stub_rx_handler
(
unsigned
int
,
char
*
);
void
init_UE
(
int
nb_inst
,
int
,
int
,
int
,
int
,
int
,
int
);
void
init_UE
(
int
,
int
,
int
,
int
,
int
,
int
,
int
);
int32_t
**
rxdata
;
int32_t
**
txdata
;
...
...
@@ -151,7 +151,8 @@ void phy_init_lte_ue_transport(PHY_VARS_UE *ue,int absraction_flag);
PHY_VARS_UE
*
init_ue_vars
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
)
uint8_t
abstraction_flag
,
int
sidelink_active
)
{
...
...
@@ -167,7 +168,8 @@ PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
ue
->
Mod_id
=
UE_id
;
ue
->
mac_enabled
=
1
;
ue
->
sidelink_active
=
sidelink_active
;
// Panos: In phy_stub_UE (MAC-to-MAC) mode these init functions don't need to get called. Is this correct?
if
(
nfapi_mode
!=
3
)
{
...
...
@@ -226,7 +228,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
PHY_VARS_UE
*
UE
;
int
inst
;
int
ret
;
LOG_I
(
PHY
,
"UE : Calling Layer 2 for initialization
\n
"
);
l2_init_ue
(
eMBMS_active
,(
uecap_xer_in
==
1
)
?
uecap_xer
:
NULL
,
...
...
@@ -236,15 +238,14 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
for
(
inst
=
0
;
inst
<
nb_inst
;
inst
++
)
{
LOG_I
(
PHY
,
"Initializing memory for UE instance %d (%p)
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
]);
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
NULL
,
inst
,
0
);
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
NULL
,
inst
,
0
,
sidelink_active
);
// turn off timing control loop in UE
PHY_vars_UE_g
[
inst
][
0
]
->
no_timing_correction
=
timing_correction
;
PHY_vars_UE_g
[
inst
][
0
]
->
SLonly
=
SLonly
;
PHY_vars_UE_g
[
inst
][
0
]
->
is_SynchRef
=
isSynchRef
;
if
(
SLonly
==
1
)
PHY_vars_UE_g
[
inst
][
0
]
->
sidelink_active
=
1
;
else
PHY_vars_UE_g
[
inst
][
0
]
->
sidelink_active
=
sidelink_active
;
LOG_I
(
PHY
,
"Intializing UE Threads for instance %d (%p,%p)...
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
],
PHY_vars_UE_g
[
inst
][
0
]);
init_UE_threads
(
inst
);
UE
=
PHY_vars_UE_g
[
inst
][
0
];
...
...
@@ -299,7 +300,7 @@ void init_UE_stub(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_ifa
for
(
inst
=
0
;
inst
<
nb_inst
;
inst
++
)
{
LOG_I
(
PHY
,
"Initializing memory for UE instance %d (%p)
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
]);
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
NULL
,
inst
,
0
);
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
NULL
,
inst
,
0
,
0
);
if
(
simL1
==
1
)
PHY_vars_UE_g
[
inst
][
0
]
->
sidelink_l2_emulation
=
2
;
else
PHY_vars_UE_g
[
inst
][
0
]
->
sidelink_l2_emulation
=
1
;
...
...
@@ -1679,7 +1680,7 @@ void *UE_threadSL(void *arg) {
int
is_synchronized
=
UE
->
is_synchronizedSL
;
AssertFatal
(
0
==
pthread_mutex_unlock
(
&
UE
->
proc
.
mutex_synch
),
""
);
LOG_
I
(
PHY
,
"UHD Thread SL (is_synchronized %d, is_SynchRef %d
\n
"
,
LOG_
D
(
PHY
,
"UHD Thread SL (is_synchronized %d, is_SynchRef %d
\n
"
,
is_synchronized
,
UE
->
is_SynchRef
);
if
(
is_synchronized
==
0
&&
UE
->
is_SynchRef
==
0
)
{
...
...
@@ -1688,11 +1689,11 @@ void *UE_threadSL(void *arg) {
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
rxp
[
i
]
=
(
void
*
)
&
UE
->
common_vars
.
rxdata_syncSL
[
i
][
0
];
AssertFatal
(
UE
->
frame_parms
.
samples_per_tti
*
1
0
==
AssertFatal
(
UE
->
frame_parms
.
samples_per_tti
*
4
0
==
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
&
timestamp
,
rxp
,
UE
->
frame_parms
.
samples_per_tti
*
1
0
,
UE
->
frame_parms
.
samples_per_tti
*
4
0
,
UE
->
frame_parms
.
nb_antennas_rx
),
""
);
AssertFatal
(
0
==
pthread_mutex_lock
(
&
UE
->
proc
.
mutex_synchSL
),
""
);
instance_cnt_synch
=
++
UE
->
proc
.
instance_cnt_synchSL
;
...
...
@@ -1708,7 +1709,7 @@ void *UE_threadSL(void *arg) {
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
rxp
[
i
]
=
(
void
*
)
&
dummy_rx
[
i
][
0
];
for
(
int
sf
=
0
;
sf
<
1
0
;
sf
++
)
for
(
int
sf
=
0
;
sf
<
4
0
;
sf
++
)
// printf("Reading dummy sf %d\n",sf);
UE
->
rfdevice
.
trx_read_func
(
&
UE
->
rfdevice
,
&
timestamp
,
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
1d8794a8
...
...
@@ -216,11 +216,11 @@ uint8_t nfapi_mode = 0;
extern
void
reset_opp_meas
(
void
);
extern
void
print_opp_meas
(
void
);
extern
PHY_VARS_UE
*
init_ue_vars
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
PHY_VARS_UE
*
init_ue_vars
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
UE_id
,
uint8_t
abstraction_flag
);
uint8_t
abstraction_flag
,
int
sidelink_active
);
int
transmission_mode
=
1
;
...
...
@@ -883,8 +883,9 @@ int main( int argc, char **argv )
NB_UE_INST
=
1
;
NB_INST
=
1
;
PHY_vars_UE_g
=
malloc
(
sizeof
(
PHY_VARS_UE
**
));
PHY_vars_UE_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_UE
*
)
*
MAX_NUM_CCs
);
PHY_vars_UE_g
[
0
][
CC_id
]
=
init_ue_vars
(
frame_parms
[
CC_id
],
0
,
abstraction_flag
);
PHY_vars_UE_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_UE
*
)
*
MAX_NUM_CCs
);
if
(
SLonly
==
1
||
synchRef
==
1
)
sidelink_active
=
1
;
PHY_vars_UE_g
[
0
][
CC_id
]
=
init_ue_vars
(
frame_parms
[
CC_id
],
0
,
abstraction_flag
,
sidelink_active
);
UE
[
CC_id
]
=
PHY_vars_UE_g
[
0
][
CC_id
];
printf
(
"PHY_vars_UE_g[0][%d] = %p
\n
"
,
CC_id
,
UE
[
CC_id
]);
...
...
@@ -1038,6 +1039,7 @@ int main( int argc, char **argv )
// start the main threads
int
eMBMS_active
=
0
;
init_UE
(
1
,
eMBMS_active
,
uecap_xer_in
,
0
,
sidelink_active
,
SLonly
,
synchRef
);
if
(
phy_test
==
0
)
{
...
...
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