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
58864d2b
Commit
58864d2b
authored
May 15, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addition of continuous reception of MIB-SL
parent
e3c7e40b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
78 additions
and
33 deletions
+78
-33
openair1/PHY/LTE_TRANSPORT/initial_syncSL.c
openair1/PHY/LTE_TRANSPORT/initial_syncSL.c
+25
-8
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+3
-1
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+3
-1
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+2
-1
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+14
-6
openair2/RRC/LITE/L2_interface_ue.c
openair2/RRC/LITE/L2_interface_ue.c
+11
-0
openair2/RRC/LITE/MESSAGES/asn1_msg.c
openair2/RRC/LITE/MESSAGES/asn1_msg.c
+0
-1
openair2/RRC/LITE/defs.h
openair2/RRC/LITE/defs.h
+2
-2
openair2/RRC/LITE/rrc_UE.c
openair2/RRC/LITE/rrc_UE.c
+17
-0
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-13
No files found.
openair1/PHY/LTE_TRANSPORT/initial_syncSL.c
View file @
58864d2b
...
...
@@ -51,14 +51,31 @@ int initial_syncSL(PHY_VARS_UE *ue) {
&
avglevel
);
printf
(
"index %d, psslevel %lld dB avglevel %lld dB => %d sample offset
\n
"
,
index
,
dB_fixed
(
psslevel
),
dB_fixed
(
avglevel
),
ue
->
rx_offsetSL
);
int32_t
sss_metric
;
int32_t
phase_max
;
rx_slsss
(
ue
,
&
sss_metric
,
&
phase_max
,
index
);
generate_sl_grouphop
(
ue
);
if
(
rx_psbch
(
ue
)
==
-
1
)
ue
->
slbch_errors
++
;
else
{
if
(
ue
->
rx_offsetSL
>=
0
)
{
int32_t
sss_metric
;
int32_t
phase_max
;
rx_slsss
(
ue
,
&
sss_metric
,
&
phase_max
,
index
);
generate_sl_grouphop
(
ue
);
if
(
rx_psbch
(
ue
)
==
-
1
)
{
ue
->
slbch_errors
++
;
return
(
-
1
);
}
else
{
// send payload to RRC
LOG_I
(
PHY
,
"Synchronization with SyncREF UE found, sending MIB-SL to RRC
\n
"
);
ue_decode_si
(
ue
->
Mod_id
,
0
,
// CC_id
0
,
// frame
0
,
// eNB_index
NULL
,
// pdu, NULL for MIB-SL
0
,
// len, 0 for MIB-SL
&
ue
->
slss_rx
,
&
frame
,
&
subframe
);
LOG_I
(
PHY
,
"RRC returns MIB-SL for frame %d, subframe %d
\n
"
);
return
(
-
1
);
}
}
}
openair1/SCHED/phy_procedures_lte_ue.c
View file @
58864d2b
...
...
@@ -3866,7 +3866,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
frame_rx
,
eNB_id
,
ue
->
dlsch_SI
[
eNB_id
]
->
harq_processes
[
0
]
->
b
,
ue
->
dlsch_SI
[
eNB_id
]
->
harq_processes
[
0
]
->
TBS
>>
3
);
ue
->
dlsch_SI
[
eNB_id
]
->
harq_processes
[
0
]
->
TBS
>>
3
,
NULL
,
NULL
,
NULL
);
break
;
case
P_PDSCH
:
// Panos: Substitute call with call to fill_dlsch_indication()
...
...
openair2/LAYER2/MAC/defs.h
View file @
58864d2b
...
...
@@ -443,7 +443,9 @@ typedef struct {
/*!\brief LCID of Carrier component activation/deactivation */
#define CC_ACT_DEACT 27
//TTN (for D2D)
#define SL_DISCOVERY 8 //LCID (fake)
/*!\brief Value of MIB-SL / SRB0 logical channel */
#define MIBSLCH 8 // (fake)
#define SL_DISCOVERY 9 //LCID (fake)
#define MAX_NUM_DEST 10
#endif
...
...
openair2/LAYER2/MAC/proto.h
View file @
58864d2b
...
...
@@ -507,7 +507,8 @@ void mac_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
uint16_t
CH_index
);
void
ue_decode_si
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frame
,
uint8_t
CH_index
,
void
*
pdu
,
uint16_t
len
);
uint8_t
CH_index
,
void
*
pdu
,
uint16_t
len
,
SLSS_t
*
slss
,
int
*
rxframe
,
int
*
rxsubframe
);
void
ue_decode_p
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frame
,
uint8_t
CH_index
,
void
*
pdu
,
uint16_t
len
);
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
58864d2b
...
...
@@ -590,7 +590,8 @@ ue_send_sdu(module_id_t module_idP,
void
ue_decode_si
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
uint8_t
eNB_index
,
void
*
pdu
,
uint16_t
len
)
uint8_t
eNB_index
,
void
*
pdu
,
uint16_t
len
,
SLSS_t
*
slss
,
int
*
frame
,
int
*
subframe
)
{
#if UE_TIMING_TRACE
start_meas
(
&
UE_mac_inst
[
module_idP
].
rx_si
);
...
...
@@ -600,11 +601,18 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
LOG_D
(
MAC
,
"[UE %d] Frame %d Sending SI to RRC (LCID Id %d,len %d)
\n
"
,
module_idP
,
frameP
,
BCCH
,
len
);
mac_rrc_data_ind_ue
(
module_idP
,
CC_id
,
frameP
,
0
,
// unknown subframe
SI_RNTI
,
BCCH
,
(
uint8_t
*
)
pdu
,
len
,
eNB_index
,
0
);
if
(
slss
==
NULL
)
{
// this is not MIB-SL
mac_rrc_data_ind_ue
(
module_idP
,
CC_id
,
frameP
,
0
,
// unknown subframe
SI_RNTI
,
BCCH
,
(
uint8_t
*
)
pdu
,
len
,
eNB_index
,
0
);
}
else
{
mac_rrc_data_ind_ue
(
module_idP
,
CC_id
,
frameP
,
0
,
// unknown subframe
SI_RNTI
,
MIBSLCH
,
(
uint8_t
*
)
pdu
,
len
,
eNB_index
,
0
);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI
,
VCD_FUNCTION_OUT
);
#if UE_TIMING_TRACE
...
...
openair2/RRC/LITE/L2_interface_ue.c
View file @
58864d2b
...
...
@@ -272,6 +272,17 @@ mac_rrc_data_ind_ue(
#endif // Rel10 || Rel14
#ifdef Rel14
if
(
srb_idP
==
MIBSLCH
)
{
LOG_I
(
RRC
,
"[UE %d] Received SDU for MIBSL
\n
"
);
if
(
decode_MIB_SL
(
&
ctxt
,
sduP
,
5
)
>=
0
)
{
// rrc_mac_config_request();
}
else
{
}
}
//TTN (for D2D)
if
(
srb_idP
==
SL_DISCOVERY
)
{
LOG_I
(
RRC
,
"[UE %d] Received SDU (%d bytes) for SL_DISCOVERY on SRB %d from eNB %d
\n
"
,
module_idP
,
sdu_lenP
,
srb_idP
,
eNB_indexP
);
...
...
openair2/RRC/LITE/MESSAGES/asn1_msg.c
View file @
58864d2b
...
...
@@ -290,7 +290,6 @@ uint8_t do_MIB_SL(const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
AssertFatal
(
eNB_index
==
0
,
"eNB_index needs to be 0
\n
"
);
if
(
UE
->
SL_MIB
==
NULL
)
UE
->
SL_MIB
=
(
uint8_t
*
)
CALLOC
(
1
,
5
);
if
(
in_coverage
>
0
){
//in coverage
...
...
openair2/RRC/LITE/defs.h
View file @
58864d2b
...
...
@@ -758,8 +758,8 @@ typedef struct UE_RRC_INST_s {
SystemInformationBlockType18_r12_t
*
sib18
[
NB_CNX_UE
];
SystemInformationBlockType19_r12_t
*
sib19
[
NB_CNX_UE
];
SBCCH_SL_BCH_Message_t
SL_mib
[
NB_CNX_UE
];
uint8_t
*
SL_MIB
;
SBCCH_SL_BCH_Message_t
*
SL_mib
[
NB_CNX_UE
];
uint8_t
SL_MIB
[
5
]
;
/// Preconfiguration for Sidelink
struct
SL_Preconfiguration_r12
*
SL_Preconfiguration
[
NB_CNX_UE
];
//source L2 Id
...
...
openair2/RRC/LITE/rrc_UE.c
View file @
58864d2b
...
...
@@ -6212,7 +6212,24 @@ void *rrc_control_socket_thread_fct(void *arg)
return
0
;
}
int
decode_MIB_SL
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
uint8_t
*
const
Sdu
,
const
uint8_t
Sdu_len
)
{
memcpy
((
void
*
)
&
UE_rrc_inst
[
ctxt_pP
->
module_id
].
SL_MIB
,
(
void
*
)
Sdu
,
Sdu_len
);
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_SBCCH_SL_BCH_Message
,
(
void
**
)
&
UE_rrc_inst
[
ctxt_pP
->
module_id
].
SL_mib
[
0
],
(
const
void
*
)
Sdu
,
Sdu_len
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
LOG_E
(
RRC
,
"[UE %d] Frame %d : Failed to decode SBCCH_SL_BCH_Message (%zu bytes)
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
dec_rval
.
consumed
);
return
-
1
;
}
return
(
0
);
}
//-----------------------------------------------------------------------------
int
decode_SL_Discovery_Message
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
...
...
targets/RT/USER/lte-ue.c
View file @
58864d2b
...
...
@@ -704,19 +704,7 @@ static void *UE_thread_synchSL(void *arg)
AssertFatal
(
0
==
pthread_mutex_unlock
(
&
UE
->
proc
.
mutex_synchSL
),
""
);
// Do initial synch here
LOG_I
(
PHY
,
"Running PSS timing estimation first
\n
"
);
int
MLind
;
int64_t
maxlev
;
int64_t
avglev
;
int
rxoffset
=
lte_sync_timeSL
(
UE
,
&
MLind
,
&
maxlev
,
&
avglev
);
if
(
rxoffset
>=
0
)
LOG_I
(
PHY
,
"Most likely Nid_SL/168 = %d with rxoffset %d, lev %d dB, avg %d dB
\n
"
,
MLind
,
rxoffset
,
dB_fixed
(
maxlev
),
dB_fixed
(
avglev
));
int32_t
sss_metric
;
int32_t
phase_max
;
rx_slsss
(
UE
,
&
sss_metric
,
&
phase_max
,
MLind
,
0
);
if
(
initial_synchSL
(
UE
)
>=
0
)
AssertFatal
(
0
==
pthread_mutex_lock
(
&
UE
->
proc
.
mutex_synchSL
),
""
);
UE
->
proc
.
instance_cnt_synchSL
--
;
...
...
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