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
6540aa2f
Commit
6540aa2f
authored
Jul 10, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logging differences and testing for SLSCH
parent
f634cbae
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
23 deletions
+37
-23
openair1/PHY/LTE_TRANSPORT/slsch.c
openair1/PHY/LTE_TRANSPORT/slsch.c
+15
-10
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+4
-1
openair1/SIMULATION/LTE_PHY/dummy_functions.c
openair1/SIMULATION/LTE_PHY/dummy_functions.c
+1
-1
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+15
-10
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+2
-1
No files found.
openair1/PHY/LTE_TRANSPORT/slsch.c
View file @
6540aa2f
...
...
@@ -413,7 +413,7 @@ void pscch_codingmodulation(PHY_VARS_UE *ue,int frame_tx,int subframe_tx,uint32_
if
(
amod
<
(
slsch
->
N_SL_RB_SC
>>
1
))
nprb
=
slsch
->
prb_Start_SC
+
amod
;
else
nprb
=
slsch
->
prb_End_SC
-
(
slsch
->
N_SL_RB_SC
>>
1
)
+
amod
;
LOG_I
(
PHY
,
"%d.%d: nprb %d, slot %d
\n
"
,
frame_tx
,
subframe_tx
,
nprb
,
slot
);
// Fill in power control later
// pssch_power_cntl(ue,proc,eNB_id,1, abstraction_flag);
// ue->tx_power_dBm[subframe_tx] = ue->slcch[eNB_id]->Po_PUSCH;
...
...
@@ -515,7 +515,7 @@ void slsch_codingmodulation(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_tx,in
AssertFatal
(
ue
->
slsch_sdu_active
>
0
,
"ue->slsch_sdu_active isn't active
\n
"
);
LOG_
I
(
PHY
,
"Generating SLSCH for rvidx %d, group_id %d, mcs %d, resource first rb %d, L_crbs %d
\n
"
,
LOG_
D
(
PHY
,
"Generating SLSCH for rvidx %d, group_id %d, mcs %d, resource first rb %d, L_crbs %d
\n
"
,
slsch
->
rvidx
,
slsch
->
group_destination_id
,
slsch
->
mcs
,
slsch
->
RB_start
,
slsch
->
L_CRBs
);
...
...
@@ -642,7 +642,7 @@ void check_and_generate_pssch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_tx,
absSF_offset
=
absSF
-
O
;
LOG_
I
(
PHY
,
"Checking pssch for absSF %d (slsch_active %d)
\n
"
,
LOG_
D
(
PHY
,
"Checking pssch for absSF %d (slsch_active %d)
\n
"
,
absSF
,
ue
->
slsch_active
);
if
(
ue
->
slsch_active
==
0
)
return
;
...
...
@@ -651,10 +651,15 @@ void check_and_generate_pssch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_tx,
absSF_modP
=
absSF_offset
%
P
;
LOG_
I
(
PHY
,
"Checking pssch for absSF_mod P %d, SubframeBitmapSL_length %d
\n
"
,
absSF_modP
,
slsch
->
SubframeBitmapSL_length
);
LOG_
D
(
PHY
,
"Checking pssch for absSF_mod P %d, SubframeBitmapSL_length %d
\n
"
,
absSF_modP
,
slsch
->
SubframeBitmapSL_length
);
// This is the condition for short SCCH bitmap (slsch->SubframeBitmapSL_length bits), check that the current subframe is for SLSCH
if
(
absSF_modP
<
slsch
->
SubframeBitmapSL_length
)
return
;
if
(
absSF_modP
==
slsch
->
SubframeBitmapSL_length
)
{
ue
->
pscch_coded
=
0
;
ue
->
pscch_generated
=
0
;
}
absSF_modP
-=
slsch
->
SubframeBitmapSL_length
;
...
...
@@ -662,7 +667,7 @@ void check_and_generate_pssch(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_tx,
"received Itrp %d: TRP8 is used with Itrp in 0...%d
\n
"
,
slsch
->
time_resource_pattern
,
TRP8_MAX
);
LOG_
I
(
PHY
,
"Checking pssch for absSF %d (trp mask %d, rv %d)
\n
"
,
LOG_
D
(
PHY
,
"Checking pssch for absSF %d (trp mask %d, rv %d)
\n
"
,
absSF
,
trp8
[
slsch
->
time_resource_pattern
][
absSF_modP
&
7
],
slsch
->
rvidx
);
// Note : this assumes Ntrp=8 for now
...
...
@@ -687,8 +692,7 @@ void check_and_generate_pscch(PHY_VARS_UE *ue,int frame_tx,int subframe_tx) {
uint32_t
absSF
=
(
frame_tx
*
10
)
+
subframe_tx
;
uint32_t
absSF_offset
,
absSF_modP
;
LOG_D
(
PHY
,
"Checking pscch for absSF %d
\n
"
,
absSF
);
if
(
ue
->
pscch_generated
==
3
)
return
;
LOG_D
(
PHY
,
"Checking pscch for absSF %d (pscch_generate = %d)
\n
"
,
absSF
,
ue
->
pscch_generated
);
...
...
@@ -732,8 +736,8 @@ void check_and_generate_pscch(PHY_VARS_UE *ue,int frame_tx,int subframe_tx) {
uint32_t
b2
=
(
slsch
->
n_pscch
+
1
+
(
a1
%
(
LPSCCH
-
1
)))
%
LPSCCH
;
LOG_I
(
PHY
,
"Checking pscch for absSF %d (N_SL_RB_SC %d, LPSCCH %d, M_RB_PSCCH_RP %d, a1 %d, a2 %d, b1 %d, b2 %d) pscch_coded %d
\n
"
,
absSF
,
slsch
->
N_SL_RB_SC
,
LPSCCH
,
M_RB_PSCCH_RP
,
a1
,
a2
,
b1
,
b2
,
ue
->
pscch_coded
);
LOG_I
(
PHY
,
"Checking pscch for absSF %d
/ n_pscch %d
(N_SL_RB_SC %d, LPSCCH %d, M_RB_PSCCH_RP %d, a1 %d, a2 %d, b1 %d, b2 %d) pscch_coded %d
\n
"
,
absSF
,
slsch
->
n_pscch
,
slsch
->
N_SL_RB_SC
,
LPSCCH
,
M_RB_PSCCH_RP
,
a1
,
a2
,
b1
,
b2
,
ue
->
pscch_coded
);
ue
->
slsch_sdu_active
=
1
;
...
...
@@ -883,6 +887,7 @@ void pscch_decoding(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,int frame_rx,int subfra
log2_maxh
=
(
log2_approx
(
avgs
)
/
2
)
+
log2_approx
(
ue
->
frame_parms
.
nb_antennas_rx
-
1
)
+
4
;
LOG_I
(
PHY
,
"%d.%d: nprb %d slot %d, pssch log2_maxh %d
\n
"
,
frame_rx
,
subframe_rx
,
nprb
,
slot
,
log2_maxh
);
for
(
int
l
=
0
;
l
<
(
ue
->
frame_parms
.
symbols_per_tti
>>
1
)
-
slot
;
l
++
)
{
int
l2
=
l
+
slot
*
(
ue
->
frame_parms
.
symbols_per_tti
>>
1
);
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
6540aa2f
...
...
@@ -49,6 +49,8 @@
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
...
...
@@ -2376,7 +2378,8 @@ void phy_procedures_UE_SL_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
// check for SLSCH
AssertFatal
(
0
==
pthread_mutex_lock
(
&
ue
->
slsch_mutex
),
""
);
if
(
ue
->
SLSCHtest
==
1
)
||
(
ue
->
slsch
=
ue_get_slsch
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
subframe_tx
,
ue
->
SLSCHtest
))
!=
NULL
)
{
if
((
ue
->
slsch
=
ue_get_slsch
(
ue
->
Mod_id
,
ue
->
CC_id
,
frame_tx
,
subframe_tx
,
ue
->
SLSCHtest
))
!=
NULL
)
{
check_and_generate_pscch
(
ue
,
frame_tx
,
subframe_tx
);
check_and_generate_pssch
(
ue
,
proc
,
frame_tx
,
subframe_tx
);
}
...
...
openair1/SIMULATION/LTE_PHY/dummy_functions.c
View file @
6540aa2f
...
...
@@ -13,7 +13,7 @@ SLSS_t *ue_get_slss(module_id_t module_idP, int CC_id,frame_t frameP, sub_frame_
SLDCH_t
*
ue_get_sldch
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
subframe
)
{
return
(
NULL
);};
SLSCH_t
*
ue_get_slsch
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
subframe
)
{
return
(
NULL
);};
SLSCH_t
*
ue_get_slsch
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
subframe
,
int
SLSCHtest
)
{
return
(
NULL
);};
void
Msg1_transmitted
(
module_id_t
module_idP
,
uint8_t
CC_id
,
frame_t
frameP
,
uint8_t
eNB_id
){}
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
6540aa2f
...
...
@@ -3450,13 +3450,14 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
if
(
absSF_modP
==
0
)
{
// this is the first subframe of PSCCH period, check for data and generate SCI
ue
->
sltx_active
=
0
;
for
(
i
=
0
;
i
<
MAX_NUM_LCID
;
i
++
){
if
(
ue
->
sl_info
[
i
].
LCID
>
0
)
{
if
(
ue
->
sl_info
[
i
].
LCID
>
0
)
{
// for (int j = 0; j < ue->numCommFlows; j++){
if
((
ue
->
sourceL2Id
>
0
)
&&
(
ue
->
sl_info
[
i
].
destinationL2Id
>
0
)
){
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
ue
->
sl_info
[
i
].
LCID
,
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
i
].
destinationL2Id
);
LOG_I
(
MAC
,
"absSF_offset %d : Checking status (%d,Dest %d) => LCID %d => %d bytes
\n
"
,
absSF_offset
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
i
].
destinationL2Id
,
ue
->
sl_info
[
i
].
LCID
,
rlc_status
.
bytes_in_buffer
);
if
(
rlc_status
.
bytes_in_buffer
>
2
){
LOG_I
(
MAC
,
"absSF_offset %d (test %d): Checking status (%d,Dest %d) => LCID %d => %d bytes
\n
"
,
absSF_offset
,
slsch_test
,
ue
->
sourceL2Id
,
ue
->
sl_info
[
i
].
destinationL2Id
,
ue
->
sl_info
[
i
].
LCID
,
rlc_status
.
bytes_in_buffer
);
if
(
rlc_status
.
bytes_in_buffer
>
2
||
slsch_test
==
1
){
if
(
slsch_test
==
1
&&
rlc_status
.
bytes_in_buffer
<=
2
)
rlc_status
.
bytes_in_buffer
=
300
;
LOG_I
(
MAC
,
"SFN.SF %d.%d: Scheduling for %d bytes in Sidelink buffer
\n
"
,
frameP
,
subframeP
,
rlc_status
.
bytes_in_buffer
);
// Fill in group id for off-network communications
...
...
@@ -3529,20 +3530,22 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
else
if
(
slsch
->
rvidx
==
2
)
slsch
->
rvidx
=
3
;
else
if
(
slsch
->
rvidx
==
3
)
slsch
->
rvidx
=
1
;
if
(
slsch
->
rvidx
>
0
&&
slsch
->
payload_length
>
0
)
{
LOG_
I
(
MAC
,
"absSF %d SLSCH TXoP rvidx %d
\n
"
,
absSF
,
slsch
->
rvidx
);
if
(
slsch
->
rvidx
>
0
)
{
LOG_
D
(
MAC
,
"absSF %d SLSCH TXoP rvidx %d
\n
"
,
absSF
,
slsch
->
rvidx
);
return
slsch
;
}
else
if
(
slsch
->
rvidx
>
0
&&
slsch
->
payload_length
==
0
)
return
((
SLSCH_t
*
)
NULL
);
else
if
(
slsch
->
rvidx
>
0
)
return
((
SLSCH_t
*
)
NULL
);
// 10 PRBs, mcs 19
int
TBS
=
get_TBS_UL
(
mcs
,
L_CRBs
);
int
req
;
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
0x1234
,
0
,
frameP
,
subframeP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
ue
->
slsch_lcid
,
0xFFFF
,
ue
->
sourceL2Id
,
ue
->
destinationL2Id
);
if
(
slsch_test
==
1
&&
rlc_status
.
bytes_in_buffer
<
2
)
rlc_status
.
bytes_in_buffer
=
300
;
if
(
TBS
<=
rlc_status
.
bytes_in_buffer
)
req
=
TBS
;
else
req
=
rlc_status
.
bytes_in_buffer
;
...
...
@@ -3562,12 +3565,14 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
#endif
);
if
(
sdu_length
==
0
&&
slsch_test
==
1
)
sdu_length
=
300
;
// Notes: 1. hard-coded to 24-bit destination format for now
if
(
sdu_length
>
0
)
{
LOG_
I
(
MAC
,
"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)
\n
"
,
frameP
,
subframeP
,
sdu_length
,
req
);
LOG_
I
(
MAC
,
"sourceL2Id: 0x%08x
\n
"
,
ue
->
sourceL2Id
);
LOG_
I
(
MAC
,
"groupL2Id/destinationL2Id: 0x%08x
\n
"
,
ue
->
destinationL2Id
);
LOG_
D
(
MAC
,
"SFN.SF %d.%d : got %d bytes from Sidelink buffer (%d requested)
\n
"
,
frameP
,
subframeP
,
sdu_length
,
req
);
LOG_
D
(
MAC
,
"sourceL2Id: 0x%08x
\n
"
,
ue
->
sourceL2Id
);
LOG_
D
(
MAC
,
"groupL2Id/destinationL2Id: 0x%08x
\n
"
,
ue
->
destinationL2Id
);
slsch
->
payload
=
(
unsigned
char
*
)
ue
->
slsch_pdu
.
payload
;
if
(
sdu_length
<
128
)
{
...
...
targets/RT/USER/lte-softmodem.h
View file @
6540aa2f
...
...
@@ -78,6 +78,7 @@
#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"
#define CONFIG_HLP_SYNCHREF "Hard-wire UE as SynchRef UE for SL"
#define CONFIG_HLP_SLSYNCONLY "Run UE with only searching procedure for SynchREF"
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
...
...
@@ -139,7 +140,7 @@
{"sim-L1", CONFIG_HLP_SIML1, 0, iptr:&simL1, defintval:0, TYPE_INT, 0}, \
{"ue-enable-sl", CONFIG_HLP_ENABLESL, PARAMFLAG_BOOL, iptr:&sidelink_active, defintval:0, TYPE_INT, 0}, \
{"ue-sl-only", CONFIG_HLP_SLONLY, PARAMFLAG_BOOL, iptr:&SLonly, defintval:0, TYPE_INT, 0}, \
{"ue-slsch-test", CONFIG_HLP_SLSCHTEST, PARAM
B
LAG_BOOL, iptr:&SLSCHtest, defintval:0, TYPE_INT, 0}, \
{"ue-slsch-test", CONFIG_HLP_SLSCHTEST, PARAM
F
LAG_BOOL, iptr:&SLSCHtest, defintval:0, TYPE_INT, 0}, \
{"ue-synchref", CONFIG_HLP_SYNCHREF, PARAMFLAG_BOOL, iptr:&synchRef, defintval:0, TYPE_INT, 0}, \
{"ue-slsync-only", CONFIG_HLP_SLSYNCONLY, PARAMFLAG_BOOL, iptr:&slsynconly, defintval:0, TYPE_INT, 0}, \
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 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