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
wangjie
OpenXG-RAN
Commits
c498cac9
Commit
c498cac9
authored
Feb 08, 2019
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed some of the warnings. Testing of sidelink still fails.
parent
9306e052
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
81 additions
and
40 deletions
+81
-40
openair1/PHY/INIT/lte_init_ue.c
openair1/PHY/INIT/lte_init_ue.c
+1
-1
openair1/PHY/LTE_TRANSPORT/initial_syncSL.c
openair1/PHY/LTE_TRANSPORT/initial_syncSL.c
+7
-1
openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
+1
-1
openair1/PHY/LTE_UE_TRANSPORT/slbch.c
openair1/PHY/LTE_UE_TRANSPORT/slbch.c
+20
-12
openair1/PHY/LTE_UE_TRANSPORT/sldch.c
openair1/PHY/LTE_UE_TRANSPORT/sldch.c
+0
-1
openair1/PHY/LTE_UE_TRANSPORT/slpss.c
openair1/PHY/LTE_UE_TRANSPORT/slpss.c
+1
-1
openair1/PHY/LTE_UE_TRANSPORT/slsch.c
openair1/PHY/LTE_UE_TRANSPORT/slsch.c
+2
-1
openair1/PHY/LTE_UE_TRANSPORT/slsss.c
openair1/PHY/LTE_UE_TRANSPORT/slsss.c
+1
-0
openair1/SCHED_UE/phy_procedures_lte_ue.c
openair1/SCHED_UE/phy_procedures_lte_ue.c
+6
-0
openair2/COMMON/rrc_messages_types.h
openair2/COMMON/rrc_messages_types.h
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+1
-1
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
+1
-0
openair2/LAYER2/RLC/rlc.c
openair2/LAYER2/RLC/rlc.c
+3
-1
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_UE.c
+3
-1
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+1
-1
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+30
-15
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+2
-2
No files found.
openair1/PHY/INIT/lte_init_ue.c
View file @
c498cac9
...
...
@@ -721,7 +721,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
common_vars
->
rxdata
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
common_vars
->
common_vars_rx_data_per_thread
[
0
].
rxdataF
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
common_vars
->
common_vars_rx_data_per_thread
[
1
].
rxdataF
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
if
(
ue
->
sidelink_active
==
1
)
common_vars
->
rxdata_syncSL
=
(
int
32
_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int16_t
*
)
);
if
(
ue
->
sidelink_active
==
1
)
common_vars
->
rxdata_syncSL
=
(
int
16
_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int16_t
*
)
);
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
common_vars
->
rxdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
(
fp
->
samples_per_tti
*
10
+
2048
)
*
sizeof
(
int32_t
)
);
...
...
openair1/PHY/LTE_TRANSPORT/initial_syncSL.c
View file @
c498cac9
...
...
@@ -40,6 +40,11 @@
#include "PHY/defs_common.h"
#include "PHY/phy_extern_ue.h"
extern
int
lte_sync_timeSL
(
PHY_VARS_UE
*
ue
,
int
*
ind
,
int64_t
*
lev
,
int64_t
*
avg
);
extern
int
rx_slsss
(
PHY_VARS_UE
*
ue
,
int32_t
*
tot_metric
,
uint8_t
*
phase_max
,
int
Nid2
);
extern
void
generate_sl_grouphop
(
PHY_VARS_UE
*
ue
);
extern
int
rx_psbch
(
PHY_VARS_UE
*
ue
,
int
frame_rx
,
int
subframe_rx
);
int
initial_syncSL
(
PHY_VARS_UE
*
ue
)
{
int
index
;
...
...
@@ -55,7 +60,7 @@ int initial_syncSL(PHY_VARS_UE *ue) {
index
,
dB_fixed64
((
uint64_t
)
psslevel
),
dB_fixed64
((
uint64_t
)
avglevel
),
ue
->
rx_offsetSL
);
if
(
ue
->
rx_offsetSL
>=
0
)
{
int32_t
sss_metric
;
int32
_t
phase_max
;
uint8
_t
phase_max
;
rx_slsss
(
ue
,
&
sss_metric
,
&
phase_max
,
index
);
generate_sl_grouphop
(
ue
);
...
...
@@ -92,6 +97,7 @@ int initial_syncSL(PHY_VARS_UE *ue) {
}
}
else
{
return
(
-
1
);
/*write_output("rxsig0.m","rxs0",&ue->common_vars.rxdata[0][ue->frame_parms.samples_per_tti*subframe],ue->frame_parms.samples_per_tti,1,1);
exit(-1);
*/
...
...
openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
View file @
c498cac9
...
...
@@ -110,7 +110,7 @@ LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,int nh
dlsch
->
max_turbo_iterations
=
max_turbo_iterations
;
for
(
i
=
0
;
i
<
nharq
;
i
++
)
{
//
printf("new_ue_dlsch: Harq process %d\n",i);
printf
(
"new_ue_dlsch: Harq process %d
\n
"
,
i
);
dlsch
->
harq_processes
[
i
]
=
(
LTE_DL_UE_HARQ_t
*
)
malloc16
(
sizeof
(
LTE_DL_UE_HARQ_t
));
if
(
dlsch
->
harq_processes
[
i
])
{
...
...
openair1/PHY/LTE_UE_TRANSPORT/slbch.c
View file @
c498cac9
...
...
@@ -38,12 +38,20 @@
//#include "defs.h"
#include "PHY/defs_UE.h"
#include "PHY/phy_extern.h"
#include "transport_proto_ue.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#define PSBCH_A 40
#define PSBCH_E 1008 //12REs/PRB*6PRBs*7symbols*2 bits/RB
//#define PSBCH_DEBUG 1
extern
void
dft_lte
(
int32_t
*
z
,
int32_t
*
d
,
int32_t
Msc_PUSCH
,
uint8_t
Nsymb
);
extern
void
ulsch_channel_level
(
int32_t
**
drs_ch_estimates_ext
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
int32_t
*
avg
,
uint16_t
nb_rb
);
extern
void
lte_idft
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
*
z
,
uint16_t
Msc_PUSCH
);
extern
void
pbch_quantize
(
int8_t
*
pbch_llr8
,
int16_t
*
pbch_llr
,
uint16_t
len
);
...
...
@@ -133,14 +141,14 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) {
int16_t
**
rxdataF
=
ue
->
sl_rxdataF
[
ue
->
current_thread_id
[
subframe_rx
]];
int
16
_t
**
rxdataF_ext
=
ue
->
pusch_slbch
->
rxdataF_ext
;
int
16
_t
**
drs_ch_estimates
=
ue
->
pusch_slbch
->
drs_ch_estimates
;
int
16
_t
**
rxdataF_comp
=
ue
->
pusch_slbch
->
rxdataF_comp
;
int
16
_t
**
ul_ch_mag
=
ue
->
pusch_slbch
->
ul_ch_mag
;
int
32
_t
**
rxdataF_ext
=
ue
->
pusch_slbch
->
rxdataF_ext
;
int
32
_t
**
drs_ch_estimates
=
ue
->
pusch_slbch
->
drs_ch_estimates
;
int
32
_t
**
rxdataF_comp
=
ue
->
pusch_slbch
->
rxdataF_comp
;
int
32
_t
**
ul_ch_mag
=
ue
->
pusch_slbch
->
ul_ch_mag
;
int32_t
avgs
;
uint8_t
log2_maxh
=
0
;
int32_t
avgU
[
2
];
int
Nsymb
=
7
;
//
int Nsymb=7;
RU_t
ru_tmp
;
memset
((
void
*
)
&
ru_tmp
,
0
,
sizeof
(
RU_t
));
...
...
@@ -170,8 +178,8 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) {
}
LOG_D
(
PHY
,
"Running PBCH detection with Nid_SL %d (is_synchronizedSL %d) rxdata %p
\n
"
,
ue
->
frame_parms
.
Nid_SL
,
ue
->
is_synchronizedSL
,
ue
->
common_vars
.
rxdata
[
0
]);
LOG_D
(
PHY
,
"slbch_decoding: FEP in %d.%d rx signal energy %d dB %d dB
\n
"
,
frame_rx
,
subframe_rx
,
dB_fixed
(
signal_energy
(
&
ue
->
common_vars
.
rxdata
[
0
][
ue
->
frame_parms
.
samples_per_tti
*
subframe_rx
],
ue
->
frame_parms
.
samples_per_tti
)),
dB_fixed
(
signal_energy
(
ue
->
sl_rxdata_7_5kHz
[
ue
->
current_thread_id
[
0
]][
0
],
ue
->
frame_parms
.
samples_per_tti
)));
dB_fixed
(
(
uint32_t
)
signal_energy
(
&
ue
->
common_vars
.
rxdata
[
0
][
ue
->
frame_parms
.
samples_per_tti
*
subframe_rx
],
ue
->
frame_parms
.
samples_per_tti
)),
dB_fixed
(
(
uint32_t
)
signal_energy
(
ue
->
sl_rxdata_7_5kHz
[
ue
->
current_thread_id
[
0
]][
0
],
ue
->
frame_parms
.
samples_per_tti
)));
for
(
int
l
=
0
;
l
<
11
;
l
++
)
{
slot_fep_ul
(
&
ru_tmp
,
l
%
7
,(
l
>
6
)
?
1
:
0
,
0
);
...
...
@@ -306,12 +314,12 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) {
uint8_t
slbch_a
[
2
+
(
PSBCH_A
>>
3
)];
uint32_t
psbch_D
;
u
int8_t
psbch_d_rx
[
96
+
(
3
*
(
16
+
PSBCH_A
))];
int8_t
psbch_d_rx
[
96
+
(
3
*
(
16
+
PSBCH_A
))];
uint8_t
dummy_w_rx
[
3
*
3
*
(
16
+
PSBCH_A
)];
uint8_t
psbch_w_rx
[
3
*
3
*
(
16
+
PSBCH_A
)];
u
int8_t
*
psbch_e_rx
=
llr
;
int8_t
psbch_w_rx
[
3
*
3
*
(
16
+
PSBCH_A
)];
int8_t
*
psbch_e_rx
=
llr
;
uint8_t
RCC
;
int
a
;
//
int a;
uint8_t
*
decoded_output
=
ue
->
slss_rx
.
slmib
;
psbch_D
=
16
+
PSBCH_A
;
...
...
@@ -358,7 +366,7 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) {
return
(
-
1
);
}
else
{
SLSS_t
dummy_slss
;
//
SLSS_t dummy_slss;
int
testframe
;
int
testsubframe
;
ue_decode_si
(
ue
->
Mod_id
,
...
...
openair1/PHY/LTE_UE_TRANSPORT/sldch.c
View file @
c498cac9
...
...
@@ -263,7 +263,6 @@ void sldch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
// Decoding
ue
->
dlsch_rx_sldch
[
npsdch
]
->
harq_processes
[
0
]
->
rvidx
=
rvidx
;
ue
->
dlsch_rx_sldch
[
npsdch
]
->
harq_processes
[
0
]
->
nb_rb
=
2
;
ue
->
dlsch_rx_sldch
[
npsdch
]
->
harq_processes
[
0
]
->
TBS
=
256
;
...
...
openair1/PHY/LTE_UE_TRANSPORT/slpss.c
View file @
c498cac9
...
...
@@ -47,7 +47,7 @@ int generate_slpss(int32_t **txdataF,
)
{
unsigned
int
Nsymb
;
//
unsigned int Nsymb;
unsigned
short
k
,
m
,
a
;
uint8_t
Nid2
;
short
*
primary_sync
;
...
...
openair1/PHY/LTE_UE_TRANSPORT/slsch.c
View file @
c498cac9
...
...
@@ -31,6 +31,7 @@
*/
#include "PHY/defs_UE.h"
#include "pssch.h"
#include "transport_proto_ue.h"
//#define PSSCH_DEBUG 1
#define DEBUG_SCI_DECODING 1
...
...
@@ -772,7 +773,7 @@ void check_and_generate_pscch(PHY_VARS_UE *ue,int frame_tx,int subframe_tx) {
}
void
generate_slsch
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
SLSCH_t
*
slsch
,
int
frame_tx
,
int
subframe_tx
)
{
void
generate_slsch
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
SLSCH_t
*
slsch
,
int
frame_tx
,
int
subframe_tx
)
{
UE_tport_t
pdu
;
size_t
slsch_header_len
=
sizeof
(
UE_tport_header_t
);
...
...
openair1/PHY/LTE_UE_TRANSPORT/slsss.c
View file @
c498cac9
...
...
@@ -36,6 +36,7 @@
#include "transport_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/MODULATION/modulation_eNB.h"
//#define DEBUG_SSS
...
...
openair1/SCHED_UE/phy_procedures_lte_ue.c
View file @
c498cac9
...
...
@@ -80,6 +80,12 @@ extern double cpuf;
void
Msg1_transmitted
(
module_id_t
module_idP
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
eNB_id
);
void
Msg3_transmitted
(
module_id_t
module_idP
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
eNB_id
);
extern
void
check_and_generate_pscch
(
PHY_VARS_UE
*
ue
,
int
frame_tx
,
int
subframe_tx
);
extern
void
check_and_generate_pssch
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
int
frame_tx
,
int
subframe_tx
);
extern
void
rx_sldch
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
int
frame_rx
,
int
subframe_rx
);
extern
void
rx_slcch
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
int
frame_rx
,
int
subframe_rx
);
extern
void
rx_slsch
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
int
frame_rx
,
int
subframe_rx
);
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
extern
uint32_t
downlink_frequency
[
MAX_NUM_CCs
][
4
];
#endif
...
...
openair2/COMMON/rrc_messages_types.h
View file @
c498cac9
...
...
@@ -26,7 +26,7 @@
* Author: winckel and Navid Nikaein
*/
#ifndef RRC_MESSAGES_TYPES_H_
<<>
#ifndef RRC_MESSAGES_TYPES_H_
#define RRC_MESSAGES_TYPES_H_
#include "as_message.h"
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
c498cac9
...
...
@@ -1327,7 +1327,7 @@ rrc_pdcp_config_asn1_req (
DevCheck4
(
drb_id
<
LTE_maxDRB
,
drb_id
,
LTE_maxDRB
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
key
=
PDCP_COLL_KEY_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
drb_id
,
SRB_FLAG_NO
);
LOG_I
(
PDCP
,
"rnti value: %d, DRB_ID: %d
\n
"
,
ctxt_pP
->
rnti
,
drb_id
);
LOG_I
(
PDCP
,
"rnti value: %d, DRB_ID: %
l
d
\n
"
,
ctxt_pP
->
rnti
,
drb_id
);
h_rc
=
hashtable_get
(
pdcp_coll_p
,
key
,
(
void
**
)
&
pdcp_p
);
if
(
h_rc
==
HASH_TABLE_OK
)
{
...
...
openair2/LAYER2/RLC/UM_v9.3.0/rlc_um.c
View file @
c498cac9
...
...
@@ -182,6 +182,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
)
{
rlc_um_entity_t
*
l_rlc_p
=
(
rlc_um_entity_t
*
)
argP
;
#if TRACE_RLC_UM_PDU || MESSAGE_CHART_GENERATOR
char
message_string
[
10000
];
mem_block_t
*
tb_p
;
...
...
openair2/LAYER2/RLC/rlc.c
View file @
c498cac9
...
...
@@ -404,7 +404,9 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
}
if
(
sourceL2Id
&&
destinationL2Id
){
LOG_I
(
RLC
,
"In sidelink case: RLC_COLL_KEY_VALUE: ctxt_pP->module_id: %d, ctxt_pP->rnti: %d, ctxt_pP->enb_flag: %d, rb_idP:%d, srb_flagP: %d
\n
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
srb_flagP
);
key
=
RLC_COLL_KEY_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
srb_flagP
);
key
=
RLC_COLL_KEY_SOURCE_DEST_VALUE
(
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
ctxt_pP
->
enb_flag
,
rb_idP
,
*
sourceL2Id
,
*
destinationL2Id
,
srb_flagP
);
//key = RLC_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, srb_flagP);
//Thinh's line originally uncommented
//key = RLC_COLL_KEY_SOURCE_DEST_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, rb_idP, *sourceL2Id, *destinationL2Id, srb_flagP);
...
...
openair2/RRC/LTE/rrc_UE.c
View file @
c498cac9
...
...
@@ -171,6 +171,7 @@ uint8_t rrc_ue_generate_SidelinkUEInformation( const protocol_ctxt_t* const ctxt
#if defined(ENABLE_USE_MME) || ENABLE_RAL
static
Rrc_State_t
rrc_get_state
(
module_id_t
ue_mod_idP
)
{
LOG_I
(
RRC
,
"In rrc_get_state
\n
"
);
return
UE_rrc_inst
[
ue_mod_idP
].
RrcState
;
}
#endif
...
...
@@ -4891,9 +4892,10 @@ void *rrc_ue_task( void *args_p )
NAS_CELL_SELECTION_REQ
(
msg_p
).
plmnID
.
MNCdigit3
,
NAS_CELL_SELECTION_REQ
(
msg_p
).
rat
);
LOG_I
(
RRC
,
"RRC_GET_STATE: UE_ID: %d"
,
ue_mod_id
);
if
(
rrc_get_state
(
ue_mod_id
)
==
RRC_STATE_INACTIVE
)
{
// have a look at MAC/main.c void dl_phy_sync_success(...)
LOG_I
(
RRC
,
"rrc_ue_task() in RRC_STATE_INACTIVE before openair_rrc_ue_init()
\n
"
);
LOG_I
(
RRC
,
"rrc_ue_task() in RRC_STATE_INACTIVE before openair_rrc_ue_init()
\n
\n
"
);
openair_rrc_ue_init
(
ue_mod_id
,
0
);
}
...
...
targets/RT/USER/lte-softmodem.h
View file @
c498cac9
...
...
@@ -79,7 +79,7 @@
#define CONFIG_HLP_PRB "Set the PRB, valid values: 6, 25, 50, 100 \n"
#define CONFIG_HLP_EMULIFACE "Set the interface name for the multicast transport for emulation mode (e.g. eth0, lo, etc.) \n"
#define CONFIG_HLP_SIML1 "Turn on simulation interface for L1"
//
#define CONFIG_HLP_SIML1 "Turn on simulation interface for L1"
#define CONFIG_HLP_ENABLESL "Enable SL functionality"
#define CONFIG_HLP_SLONLY "Use SL only (i.e. wire UE to off-network state)"
#define CONFIG_HLP_SLSCHTEST "Activate dummy transmission of SCI/SLSCH for testing"
...
...
targets/RT/USER/lte-ue.c
View file @
c498cac9
...
...
@@ -40,6 +40,7 @@
#include "PHY/INIT/phy_init.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "openair1/SIMULATION/TOOLS/sim.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
...
...
@@ -86,6 +87,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
void
init_UE_stub
(
int
nb_inst
,
int
,
int
,
char
*
,
int
);
void
init_UE_stub_single_thread
(
int
nb_inst
,
int
,
int
,
char
*
,
int
);
int
init_timer_thread
(
void
);
void
init_sl_channel
(
void
);
extern
void
oai_subframe_ind
(
uint16_t
sfn
,
uint16_t
sf
);
extern
void
multicast_link_start
(
void
(
*
rx_handlerP
)
(
unsigned
int
,
char
*
),
unsigned
char
_multicast_group
,
char
*
multicast_ifname
);
...
...
@@ -95,6 +97,15 @@ extern int oai_nfapi_harq_indication(nfapi_harq_indication_t *harq_ind);
extern
int
oai_nfapi_sr_indication
(
nfapi_sr_indication_t
*
ind
);
extern
int
oai_nfapi_rx_ind
(
nfapi_rx_indication_t
*
ind
);
extern
int
multicast_link_write_sock
(
int
groupP
,
char
*
dataP
,
uint32_t
sizeP
);
extern
int
initial_syncSL
(
PHY_VARS_UE
*
ue
);
//The following 4 lines need to be uncommented for SL emulation and correspond to the current definitions of the function
/*extern void check_and_generate_pscch(PHY_VARS_UE *ue,int frame_tx,int subframe_tx);
extern void check_and_generate_pssch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_tx,int subframe_tx);
extern void do_SL_sig(int UE_id,channel_desc_t *UE2UE[NUMBER_OF_UE_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs],
uint16_t subframe,uint16_t slot, int symbol_offset, LTE_DL_FRAME_PARMS *frame_parms,
uint32_t frame,uint8_t CC_id);
extern void rx_slcch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subframe_rx);*/
extern
int
simL1flag
;
extern
uint16_t
sf_ahead
;
...
...
@@ -392,7 +403,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
&
UE
->
proc
.
attr_ue
,
UE_thread
,
(
void
*
)
UE
),
""
);
if
(
UE
->
sidelink_active
==
1
)
if
(
UE
->
sidelink_active
==
1
)
AssertFatal
(
0
==
pthread_create
(
&
UE
->
proc
.
pthread_ueSL
,
&
UE
->
proc
.
attr_ueSL
,
UE_threadSL
,
...
...
@@ -782,16 +793,17 @@ static void *UE_thread_synch(void *arg)
return
&
UE_thread_synch_retval
;
}
extern
int64_t
*
sync_corr_ue1
;
//
extern int64_t* sync_corr_ue1;
static
void
*
UE_thread_synchSL
(
void
*
arg
)
{
static
int
UE_thread_synch_retval
;
int
i
,
hw_slot_offset
;
//static int UE_thread_synch_retval;
int
i
;
//int hw_slot_offset;
PHY_VARS_UE
*
UE
=
(
PHY_VARS_UE
*
)
arg
;
int
current_band
=
0
;
int
current_offset
=
0
;
sync_mode_t
sync_mode
=
pbch
;
//
int current_offset = 0;
//
sync_mode_t sync_mode = pbch;
int
CC_id
=
UE
->
CC_id
;
int
ind
;
int
found
;
...
...
@@ -838,11 +850,11 @@ static void *UE_thread_synchSL(void *arg)
openair0_cfg
[
UE
->
rf_map
.
card
].
duplex_mode
=
duplex_mode_TDD
;
}
while
(
sync_var
<
0
)
/*
while (sync_var<0)
pthread_cond_wait(&sync_cond, &sync_mutex);
pthread_mutex_unlock
(
&
sync_mutex
);
pthread_mutex_unlock(&sync_mutex);*/
wait_sync
(
"UE thread synchSL"
);
while
(
oai_exit
==
0
)
{
...
...
@@ -877,7 +889,7 @@ static void *UE_thread_synchSL(void *arg)
UE
->
UE_scan_carrier
=
0
;
}
else
{
AssertFatal
(
0
==
pthread_mutex_lock
(
&
UE
->
proc
.
mutex_synch
),
""
);
LOG_I
(
PHY
,
"Setting UE->is_synchronized to
1
\n
"
,
UE
->
is_synchronized
);
LOG_I
(
PHY
,
"Setting UE->is_synchronized to
%d
\n
"
,
UE
->
is_synchronized
);
UE
->
is_synchronizedSL
=
1
;
AssertFatal
(
0
==
pthread_mutex_unlock
(
&
UE
->
proc
.
mutex_synch
),
""
);
}
...
...
@@ -1116,7 +1128,6 @@ static void *UE_thread_rxn_txnp4(void *arg) {
}
#include "openair1/SIMULATION/TOOLS/sim.h"
unsigned
int
emulator_absSF
;
channel_desc_t
*
UE2UE
[
NUMBER_OF_UE_MAX
][
NUMBER_OF_UE_MAX
][
MAX_NUM_CCs
];
...
...
@@ -1168,10 +1179,12 @@ void ue_stub_rx_handler(unsigned int num_bytes, char *rx_buffer) {
if
(
UE
->
sidelink_l2_emulation
==
2
)
{
// do simulation here
UE
->
slsch
=
slsch
;
check_and_generate_pscch
(
UE
,
frame
,
subframe
);
//The following 4 lines need to be uncommented for emulation and correspond to the current definitions of the functions
/*check_and_generate_pscch(UE,frame,subframe);
check_and_generate_pssch(UE,frame,subframe);
do_SL_sig(UE2UE,subframe,&UE->frame_parms,frame,0);
rx_slcch
(
UE
,
frame
,
subframe
);
rx_slcch(UE,frame,subframe);
*/
}
ue_send_sl_sdu
(
0
,
0
,
...
...
@@ -2305,9 +2318,11 @@ void *UE_threadSL(void *arg) {
UE
->
proc
.
instance_cnt_synchSL
=-
1
;
while
(
sync_var
<
0
)
/*
while (sync_var<0)
pthread_cond_wait(&sync_cond, &sync_mutex);
pthread_mutex_unlock
(
&
sync_mutex
);
pthread_mutex_unlock(&sync_mutex);*/
wait_sync
(
"UE thread SL"
);
AssertFatal
(
UE
->
rfdevice
.
trx_start_func
(
&
UE
->
rfdevice
)
==
0
,
"Could not start the device"
);
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
c498cac9
...
...
@@ -1042,14 +1042,14 @@ int main( int argc, char **argv ) {
// connect the TX/RX buffers
/*
if
(
nfapi_mode
!=
3
)
{
if
(
setup_ue_buffers
(
PHY_vars_UE_g
[
0
],
&
openair0_cfg
[
0
])
!=
0
)
{
printf
(
"Error setting up eNB buffer
\n
"
);
exit
(
-
1
);
}
}
*/
if
(
input_fd
)
{
printf
(
"Reading in from file to antenna buffer %d
\n
"
,
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