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
zzha zzha
OpenXG-RAN
Commits
a31432e3
Commit
a31432e3
authored
Dec 04, 2015
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some cleanup
parent
f630fc58
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
19 deletions
+24
-19
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+13
-13
openair1/SCHED/defs.h
openair1/SCHED/defs.h
+1
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+10
-5
No files found.
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
a31432e3
...
...
@@ -1105,7 +1105,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
(
dlsch0_harq
->
round
==
0
)
{
/* necessary test? */
if
(
dlsch0_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch
[
0
],
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch
[
0
],
harq_pid
);
dlsch0_harq
->
status
=
ACTIVE
;
}
...
...
@@ -1243,7 +1243,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
(
dlsch0_harq
->
round
==
0
)
{
/* necessary test? */
if
(
dlsch0_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch
[
0
],
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch
[
0
],
harq_pid
);
dlsch0_harq
->
status
=
ACTIVE
;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
// MCS and TBS don't change across HARQ rounds
...
...
@@ -1614,14 +1614,14 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
(
dlsch0_harq
->
round
==
0
)
{
/* necessary test? */
if
(
dlsch0_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
dlsch0_harq
->
status
=
ACTIVE
;
}
if
(
dlsch1_harq
->
round
==
0
)
{
/* necessary test? */
if
(
dlsch1_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch1
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch1
,
harq_pid
);
dlsch1_harq
->
status
=
ACTIVE
;
}
...
...
@@ -2001,14 +2001,14 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
((
dlsch0
->
active
==
1
)
&&
(
dlsch0_harq
->
round
==
0
))
{
/* necessary test? */
if
(
dlsch0_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
dlsch0_harq
->
status
=
ACTIVE
;
}
if
((
dlsch1
->
active
==
1
)
&&
(
dlsch1_harq
->
round
==
0
))
{
/* necessary test? */
if
(
dlsch1_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch1
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch1
,
harq_pid
);
dlsch1_harq
->
status
=
ACTIVE
;
}
...
...
@@ -2151,12 +2151,12 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
((
dlsch0_harq
->
rvidx
==
1
)
&&
(
dlsch0_harq
->
mcs
==
0
))
{
LOG_W
(
PHY
,
"what to do with respect to
get
_harq_pid_from_freelist?
\n
"
);
LOG_W
(
PHY
,
"what to do with respect to
remove
_harq_pid_from_freelist?
\n
"
);
dlsch0_harq
->
status
=
DISABLED
;
}
if
((
dlsch1_harq
->
rvidx
==
1
)
&&
(
dlsch1_harq
->
mcs
==
0
))
{
LOG_W
(
PHY
,
"what to do with respect to
get
_harq_pid_from_freelist?
\n
"
);
LOG_W
(
PHY
,
"what to do with respect to
remove
_harq_pid_from_freelist?
\n
"
);
dlsch1_harq
->
status
=
DISABLED
;
}
...
...
@@ -2166,7 +2166,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
(
dlsch0_harq
->
round
==
0
)
{
/* necessary test? */
if
(
dlsch0_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
dlsch0_harq
->
status
=
ACTIVE
;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
...
...
@@ -2333,7 +2333,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
((
dlsch0_harq
->
round
==
0
)
&&
(
dlsch0
->
active
==
1
)
)
{
/* necessary test? */
if
(
dlsch0_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
dlsch0_harq
->
status
=
ACTIVE
;
dlsch0_harq
->
mcs
=
mcs1
;
}
...
...
@@ -2341,7 +2341,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
((
dlsch1_harq
->
round
==
0
)
&&
(
dlsch1
->
active
==
1
)
)
{
/* necessary test? */
if
(
dlsch1_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch1
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch1
,
harq_pid
);
dlsch1_harq
->
status
=
ACTIVE
;
dlsch1_harq
->
mcs
=
mcs2
;
}
...
...
@@ -2507,7 +2507,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
(
dlsch0_harq
->
round
==
0
)
{
/* necessary test? */
if
(
dlsch0_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
dlsch0_harq
->
status
=
ACTIVE
;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
...
...
@@ -2639,7 +2639,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if
(
dlsch0_harq
->
round
==
0
)
{
/* necessary test? */
if
(
dlsch0_harq
->
status
==
SCH_IDLE
)
get
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
remove
_harq_pid_from_freelist
(
dlsch0
,
harq_pid
);
dlsch0_harq
->
status
=
ACTIVE
;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
...
...
openair1/SCHED/defs.h
View file @
a31432e3
...
...
@@ -402,7 +402,7 @@ uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1);
int
get_nCCE_offset
(
unsigned
char
L
,
int
nCCE
,
int
common_dci
,
unsigned
short
rnti
,
unsigned
char
subframe
);
void
put_harq_pid_in_freelist
(
LTE_eNB_DLSCH_t
*
DLSCH_ptr
,
int
harq_pid
);
void
get
_harq_pid_from_freelist
(
LTE_eNB_DLSCH_t
*
DLSCH_ptr
,
int
harq_pid
);
void
remove
_harq_pid_from_freelist
(
LTE_eNB_DLSCH_t
*
DLSCH_ptr
,
int
harq_pid
);
int8_t
find_ue
(
uint16_t
rnti
,
PHY_VARS_eNB
*
phy_vars_eNB
);
int32_t
add_ue
(
int16_t
rnti
,
PHY_VARS_eNB
*
phy_vars_eNB
);
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
a31432e3
...
...
@@ -142,12 +142,21 @@ void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid)
DLSCH_ptr
->
tail_freelist
=
(
DLSCH_ptr
->
tail_freelist
+
1
)
%
10
;
}
void
get
_harq_pid_from_freelist
(
LTE_eNB_DLSCH_t
*
DLSCH_ptr
,
int
harq_pid
)
void
remove
_harq_pid_from_freelist
(
LTE_eNB_DLSCH_t
*
DLSCH_ptr
,
int
harq_pid
)
{
if
(
DLSCH_ptr
->
head_freelist
==
DLSCH_ptr
->
tail_freelist
)
{
LOG_E
(
PHY
,
"%s:%d: you cannot read this!
\n
"
,
__FILE__
,
__LINE__
);
abort
();
}
/* basic check, in case several threads deal with the free list at the same time
* in normal situations it should not happen, that's also why we don't use any
* locking mechanism to protect the free list
* to be refined in case things don't work properly
*/
if
(
harq_pid
!=
DLSCH_ptr
->
harq_pid_freelist
[
DLSCH_ptr
->
head_freelist
])
{
LOG_E
(
PHY
,
"%s:%d: critical error, get in touch with the authors
\n
"
,
__FILE__
,
__LINE__
);
abort
();
}
DLSCH_ptr
->
head_freelist
=
(
DLSCH_ptr
->
head_freelist
+
1
)
%
10
;
}
...
...
@@ -247,15 +256,12 @@ int8_t find_next_ue_index(PHY_VARS_eNB *phy_vars_eNB)
int
get_ue_active_harq_pid
(
const
uint8_t
Mod_id
,
const
uint8_t
CC_id
,
const
uint16_t
rnti
,
const
int
frame
,
const
uint8_t
subframe
,
uint8_t
*
harq_pid
,
uint8_t
*
round
,
const
uint8_t
ul_flag
)
{
int
hp2sf
[]
=
{
1
,
2
,
3
,
4
,
6
,
7
,
8
,
9
};
LTE_eNB_DLSCH_t
*
DLSCH_ptr
;
LTE_eNB_ULSCH_t
*
ULSCH_ptr
;
uint8_t
ulsch_subframe
,
ulsch_frame
;
uint8_t
i
;
int8_t
UE_id
=
find_ue
(
rnti
,
PHY_vars_eNB_g
[
Mod_id
][
CC_id
]);
int
sf1
=
(
10
*
frame
)
+
subframe
,
sf2
,
sfdiff
,
sfdiff_max
=
7
;
int
first_proc_found
=
0
;
if
(
UE_id
==-
1
)
{
LOG_D
(
PHY
,
"Cannot find UE with rnti %x (Mod_id %d, CC_id %d)
\n
"
,
rnti
,
Mod_id
,
CC_id
);
...
...
@@ -283,7 +289,6 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16
sfdiff_max
=
sfdiff
;
*
harq_pid
=
i
;
*
round
=
DLSCH_ptr
->
harq_processes
[
i
]
->
round
;
first_proc_found
=
1
;
}
}
}
else
{
// a process is not defined
...
...
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