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
cc7037d8
Commit
cc7037d8
authored
Mar 07, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control code for SLSCH user-plane
parent
18cca485
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
2 deletions
+59
-2
openair1/PHY/LTE_TRANSPORT/defs.h
openair1/PHY/LTE_TRANSPORT/defs.h
+1
-1
openair1/PHY/LTE_TRANSPORT/slsch.c
openair1/PHY/LTE_TRANSPORT/slsch.c
+56
-1
openair1/PHY/defs.h
openair1/PHY/defs.h
+2
-0
No files found.
openair1/PHY/LTE_TRANSPORT/defs.h
View file @
cc7037d8
openair1/PHY/LTE_TRANSPORT/slsch.c
View file @
cc7037d8
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#ifndef __LTE_TRANSPORT_SLSS__C__
#ifndef __LTE_TRANSPORT_SLSS__C__
#define __LTE_TRANSPORT_SLSS__C__
#define __LTE_TRANSPORT_SLSS__C__
#include "PHY/defs.h"
#include "PHY/defs.h"
#include "pssch.h"
int64_t
sci_mapping
(
PHY_VARS_UE
*
ue
)
{
int64_t
sci_mapping
(
PHY_VARS_UE
*
ue
)
{
SLSCH_t
*
slsch
=
ue
->
slsch
;
SLSCH_t
*
slsch
=
ue
->
slsch
;
...
@@ -419,6 +420,60 @@ void pscch_codingmodulation(PHY_VARS_UE *ue,int frame_tx,int subframe_tx,uint32_
...
@@ -419,6 +420,60 @@ void pscch_codingmodulation(PHY_VARS_UE *ue,int frame_tx,int subframe_tx,uint32_
}
}
void
slsch_codingmodulation
()
{
}
void
check_and_generate_pssch
(
PHY_VARS_UE
*
ue
,
int
frame_tx
,
int
subframe_tx
)
{
AssertFatal
(
frame_tx
<
1024
&&
frame_tx
>
0
,
"frame %d is illegal
\n
"
,
frame_tx
);
AssertFatal
(
subframe_tx
<
10
&&
subframe_tx
>
0
,
"subframe %d is illegal
\n
"
,
subframe_tx
);
SLSCH_t
*
slsch
=
ue
->
slsch
;
AssertFatal
(
slsch
!=
NULL
,
"SLSCH is null
\n
"
);
uint32_t
O
=
ue
->
slsch
->
SL_OffsetIndicator
;
uint32_t
P
=
ue
->
slsch
->
SL_SC_Period
;
uint32_t
absSF
=
(
frame_tx
*
10
)
+
subframe_tx
;
uint32_t
absSF_offset
,
absSF_modP
;
absSF_offset
=
absSF
-
O
;
if
(
ue
->
slsch_active
==
0
)
return
;
if
(
absSF_offset
<
O
)
return
;
absSF_modP
=
absSF_offset
%
P
;
// This is the condition for short SCCH bitmap (40 bits), check that the current subframe is for SLSCH
if
(
absSF_modP
<
40
)
return
;
absSF_modP
-=
40
;
AssertFatal
(
slsch
->
time_resource_pattern
<
TRP8_MAX
,
"received Itrp %d: TRP8 is used with Itrp in 0...%d
\n
"
,
slsch
->
time_resource_pattern
,
TRP8_MAX
);
// Note : this assumes Ntrp=8 for now
if
(
trp8
[
slsch
->
time_resource_pattern
][
absSF_modP
&
8
]
==
0
)
return
;
// we have an opportunity in this subframe
if
(
slsch
->
rvidx
==
0
)
{
// first new transmission in period, get a new packet
// call to MAC to update data pointer and length
// mac_update_slsch();
if
(
slsch
->
payload_length
==
0
)
{
ue
->
slsch_sdu_active
=
0
;
return
;
}
ue
->
slsch_sdu_active
=
1
;
slsch_codingmodulation
(
ue
,
frame_tx
,
subframe_tx
);
slsch
->
rvidx
=
2
;
}
else
if
(
ue
->
slsch_sdu_active
==
1
){
slsch_codingmodulation
(
ue
,
frame_tx
,
subframe_tx
);
if
(
slsch
->
rvidx
==
2
)
slsch
->
rvidx
=
3
;
else
if
(
slsch
->
rvidx
==
3
)
slsch
->
rvidx
=
1
;
else
if
(
slsch
->
rvidx
==
1
)
slsch
->
rvidx
=
0
;
else
AssertFatal
(
1
==
0
,
"rvidx %d isn't possible
\n
"
,
slsch
->
rvidx
);
}
}
void
check_and_generate_pscch
(
PHY_VARS_UE
*
ue
,
int
frame_tx
,
int
subframe_tx
)
{
void
check_and_generate_pscch
(
PHY_VARS_UE
*
ue
,
int
frame_tx
,
int
subframe_tx
)
{
AssertFatal
(
frame_tx
<
1024
&&
frame_tx
>
0
,
"frame %d is illegal
\n
"
,
frame_tx
);
AssertFatal
(
frame_tx
<
1024
&&
frame_tx
>
0
,
"frame %d is illegal
\n
"
,
frame_tx
);
...
@@ -511,7 +566,7 @@ void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slsch,int frame_tx,int subframe_tx)
...
@@ -511,7 +566,7 @@ void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slsch,int frame_tx,int subframe_tx)
}
}
// check and flll SCI portion
// check and flll SCI portion
check_and_generate_pscch
(
ue
,
frame_tx
,
subframe_tx
);
check_and_generate_pscch
(
ue
,
frame_tx
,
subframe_tx
);
//
check_and_generate_pssch(ue,frame_tx,subframe_tx);
check_and_generate_pssch
(
ue
,
frame_tx
,
subframe_tx
);
}
}
...
...
openair1/PHY/defs.h
View file @
cc7037d8
...
@@ -1253,6 +1253,8 @@ typedef struct {
...
@@ -1253,6 +1253,8 @@ typedef struct {
SL_chan_t
sl_chan
;
SL_chan_t
sl_chan
;
SLSCH_t
*
slsch
;
SLSCH_t
*
slsch
;
SLSCH_t
slsch_rx
;
SLSCH_t
slsch_rx
;
int
slsch_active
;
int
slsch_sdu_active
;
int
slcch_received
;
int
slcch_received
;
uint8_t
sidelink_l2_emulation
;
uint8_t
sidelink_l2_emulation
;
//Paging parameters
//Paging parameters
...
...
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