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
alex037yang
OpenXG-RAN
Commits
574399fa
Commit
574399fa
authored
Jan 06, 2016
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some formatting changes in physcope for eNodeB. fixes for joint SR/ACK-NAK detection.
parent
e44146b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
37 deletions
+68
-37
openair1/PHY/TOOLS/lte_phy_scope.c
openair1/PHY/TOOLS/lte_phy_scope.c
+7
-4
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+46
-31
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+15
-2
No files found.
openair1/PHY/TOOLS/lte_phy_scope.c
View file @
574399fa
...
...
@@ -160,7 +160,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
int
UE_id
)
{
int
eNB_id
=
0
;
int
i
,
arx
,
atx
,
ind
,
k
;
int
i
,
i2
,
arx
,
atx
,
ind
,
k
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
phy_vars_enb
->
lte_frame_parms
;
int
nsymb_ce
=
12
*
frame_parms
->
N_RB_UL
*
frame_parms
->
symbols_per_tti
;
uint8_t
nb_antennas_rx
=
frame_parms
->
nb_antennas_rx
;
...
...
@@ -181,6 +181,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
float
chest_t_abs
[
nb_antennas_rx
][
frame_parms
->
ofdm_symbol_size
];
float
*
chest_f_abs
;
float
time
[
FRAME_LENGTH_COMPLEX_SAMPLES
];
float
time2
[
2048
];
float
freq
[
nsymb_ce
*
nb_antennas_rx
*
nb_antennas_tx
];
int
frame
=
phy_vars_enb
->
proc
[
0
].
frame_tx
;
uint32_t
total_dlsch_bitrate
=
phy_vars_enb
->
total_dlsch_bitrate
;
...
...
@@ -238,19 +239,21 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
if
(
chest_t
[
0
]
!=
NULL
)
{
for
(
i
=
0
;
i
<
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
chest_t_abs
[
0
][
i
]
=
10
*
log10
((
float
)
(
chest_t
[
0
][
2
*
i
]
*
chest_t
[
0
][
2
*
i
]
+
chest_t
[
0
][
2
*
i
+
1
]
*
chest_t
[
0
][
2
*
i
+
1
]));
i2
=
(
i
+
(
frame_parms
->
ofdm_symbol_size
>>
1
))
%
frame_parms
->
ofdm_symbol_size
;
time2
[
i
]
=
(
float
)(
i
-
(
frame_parms
->
ofdm_symbol_size
>>
1
));
chest_t_abs
[
0
][
i
]
=
10
*
log10
((
float
)
(
1
+
chest_t
[
0
][
2
*
i2
]
*
chest_t
[
0
][
2
*
i2
]
+
chest_t
[
0
][
2
*
i2
+
1
]
*
chest_t
[
0
][
2
*
i2
+
1
]));
if
(
chest_t_abs
[
0
][
i
]
>
ymax
)
ymax
=
chest_t_abs
[
0
][
i
];
}
fl_set_xyplot_data
(
form
->
chest_t
,
time
,
chest_t_abs
[
0
],(
frame_parms
->
ofdm_symbol_size
),
""
,
""
,
""
);
fl_set_xyplot_data
(
form
->
chest_t
,
time
2
,
chest_t_abs
[
0
],(
frame_parms
->
ofdm_symbol_size
),
""
,
""
,
""
);
}
for
(
arx
=
1
;
arx
<
nb_antennas_rx
;
arx
++
)
{
if
(
chest_t
[
arx
]
!=
NULL
)
{
for
(
i
=
0
;
i
<
(
frame_parms
->
ofdm_symbol_size
>>
3
);
i
++
)
{
chest_t_abs
[
arx
][
i
]
=
10
*
log10
((
float
)
(
chest_t
[
arx
][
2
*
i
]
*
chest_t
[
arx
][
2
*
i
]
+
chest_t
[
arx
][
2
*
i
+
1
]
*
chest_t
[
arx
][
2
*
i
+
1
]));
chest_t_abs
[
arx
][
i
]
=
10
*
log10
((
float
)
(
1
+
chest_t
[
arx
][
2
*
i
]
*
chest_t
[
arx
][
2
*
i
]
+
chest_t
[
arx
][
2
*
i
+
1
]
*
chest_t
[
arx
][
2
*
i
+
1
]));
if
(
chest_t_abs
[
arx
][
i
]
>
ymax
)
ymax
=
chest_t_abs
[
arx
][
i
];
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
574399fa
...
...
@@ -3122,7 +3122,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
int16_t
n1_pucch0
,
n1_pucch1
,
n1_pucch2
,
n1_pucch3
;
uint8_t
do_SR
=
0
;
uint8_t
pucch_sel
=
0
;
int32_t
metric0
=
0
,
metric1
=
0
;
int32_t
metric0
=
0
,
metric1
=
0
,
metric0_SR
=
0
;
ANFBmode_t
bundling_flag
;
PUCCH_FMT_t
format
;
uint8_t
nPRS
;
...
...
@@ -3664,7 +3664,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
harq_pid
,
&
phy_vars_eNB
->
ulsch_eNB
[
i
]
->
Msg3_flag
);
//
false msg3 detection by MAC: empty PDU
//
one-shot msg3 detection by MAC: empty PDU (e.g. CRNTI)
if
(
phy_vars_eNB
->
ulsch_eNB
[
i
]
->
Msg3_flag
==
0
)
{
phy_vars_eNB
->
eNB_UE_stats
[
i
].
mode
=
PRACH
;
mac_xface
->
cancel_ra_proc
(
phy_vars_eNB
->
Mod_id
,
...
...
@@ -3868,24 +3868,24 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
phy_vars_eNB
->
eNB_UE_stats
[
i
].
sr_total
++
;
if
(
abstraction_flag
==
0
)
metric0
=
rx_pucch
(
phy_vars_eNB
,
pucch_format1
,
i
,
phy_vars_eNB
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
,
0
,
// n2_pucch
0
,
// shortened format, should be use_srs flag, later
&
SR_payload
,
subframe
,
PUCCH1_THRES
);
metric0
_SR
=
rx_pucch
(
phy_vars_eNB
,
pucch_format1
,
i
,
phy_vars_eNB
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
,
0
,
// n2_pucch
0
,
// shortened format, should be use_srs flag, later
&
SR_payload
,
subframe
,
PUCCH1_THRES
);
#ifdef PHY_ABSTRACTION
else
{
metric0
=
rx_pucch_emul
(
phy_vars_eNB
,
i
,
pucch_format1
,
0
,
&
SR_payload
,
sched_subframe
);
metric0
_SR
=
rx_pucch_emul
(
phy_vars_eNB
,
i
,
pucch_format1
,
0
,
&
SR_payload
,
sched_subframe
);
LOG_D
(
PHY
,
"[eNB %d][SR %x] Frame %d subframe %d Checking SR (UE SR %d/%d)
\n
"
,
phy_vars_eNB
->
Mod_id
,
phy_vars_eNB
->
ulsch_eNB
[
i
]
->
rnti
,
frame
,
subframe
,
SR_payload
,
phy_vars_eNB
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
);
}
...
...
@@ -3921,20 +3921,35 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
if
((
n1_pucch0
==-
1
)
&&
(
n1_pucch1
==-
1
))
{
// just check for SR
}
else
if
(
phy_vars_eNB
->
lte_frame_parms
.
frame_type
==
FDD
)
{
// FDD
// if SR was detected, use the n1_pucch from SR, else use n1_pucch0
n1_pucch0
=
(
SR_payload
==
1
)
?
phy_vars_eNB
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
:
n1_pucch0
;
//
n1_pucch0 = (SR_payload==1) ? phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex:n1_pucch0;
LOG_D
(
PHY
,
"Demodulating PUCCH for ACK/NAK: n1_pucch0 %d (%d), SR_payload %d
\n
"
,
n1_pucch0
,
phy_vars_eNB
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
,
SR_payload
);
if
(
abstraction_flag
==
0
)
if
(
abstraction_flag
==
0
)
{
metric0
=
rx_pucch
(
phy_vars_eNB
,
pucch_format1a
,
i
,
(
uint16_t
)
n1_pucch0
,
0
,
//n2_pucch
1
,
// shortened format
0
,
// shortened format
pucch_payload0
,
subframe
,
PUCCH1a_THRES
);
if
(
metric0
<
metric0_SR
)
metric0
=
rx_pucch
(
phy_vars_eNB
,
pucch_format1a
,
i
,
phy_vars_eNB
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
,
0
,
//n2_pucch
0
,
// shortened format
pucch_payload0
,
subframe
,
PUCCH1a_THRES
);
}
else
{
#ifdef PHY_ABSTRACTION
metric0
=
rx_pucch_emul
(
phy_vars_eNB
,
i
,
...
...
@@ -3986,15 +4001,15 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
#endif
if
(
abstraction_flag
==
0
)
metric0
=
rx_pucch
(
phy_vars_eNB
,
format
,
i
,
phy_vars_eNB
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
,
0
,
//n2_pucch
1
,
// shortened format
pucch_payload0
,
subframe
,
PUCCH1a_THRES
);
metric0
_SR
=
rx_pucch
(
phy_vars_eNB
,
format
,
i
,
phy_vars_eNB
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
,
0
,
//n2_pucch
0
,
// shortened format
pucch_payload0
,
subframe
,
PUCCH1a_THRES
);
else
{
#ifdef PHY_ABSTRACTION
metric0
=
rx_pucch_emul
(
phy_vars_eNB
,
i
,
...
...
@@ -4022,7 +4037,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
i
,
(
uint16_t
)
n1_pucch0
,
0
,
// n2_pucch
1
,
// shortened format
0
,
// shortened format
pucch_payload0
,
subframe
,
PUCCH1a_THRES
);
...
...
@@ -4045,7 +4060,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_
i
,
(
uint16_t
)
n1_pucch1
,
0
,
//n2_pucch
1
,
// shortened format
0
,
// shortened format
pucch_payload1
,
subframe
,
PUCCH1a_THRES
);
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
574399fa
...
...
@@ -88,6 +88,7 @@ void rx_sdu(
int
ii
,
j
;
eNB_MAC_INST
*
eNB
=
&
eNB_mac_inst
[
enb_mod_idP
];
UE_list_t
*
UE_list
=
&
eNB
->
UE_list
;
int
crnti_rx
=
0
;
start_meas
(
&
eNB
->
rx_ulsch_sdu
);
...
...
@@ -128,9 +129,9 @@ void rx_sdu(
case
CRNTI
:
UE_id
=
find_UE_id
(
enb_mod_idP
,(((
uint16_t
)
payload_ptr
[
0
])
<<
8
)
+
payload_ptr
[
1
]);
LOG_I
(
MAC
,
"[eNB %d] CC_id %d MAC CE_LCID %d (ce %d/%d): CRNTI %x (UE_id %d) in Msg3
\n
"
,
enb_mod_idP
,
CC_idP
,
rx_ces
[
i
],
i
,
num_ce
,(((
uint16_t
)
payload_ptr
[
0
])
<<
8
)
+
payload_ptr
[
1
],
UE_id
);
crnti_rx
=
1
;
payload_ptr
+=
2
;
/* we don't process this CE yet */
if
(
msg3_flagP
!=
NULL
)
{
*
msg3_flagP
=
0
;
}
...
...
@@ -144,6 +145,9 @@ void rx_sdu(
LOG_D
(
MAC
,
"[eNB %d] CC_id %d MAC CE_LCID %d : Received short BSR LCGID = %u bsr = %d
\n
"
,
enb_mod_idP
,
CC_idP
,
rx_ces
[
i
],
lcgid
,
payload_ptr
[
0
]
&
0x3f
);
if
(
crnti_rx
==
1
)
LOG_I
(
MAC
,
"[eNB %d] CC_id %d MAC CE_LCID %d : Received short BSR LCGID = %u bsr = %d
\n
"
,
enb_mod_idP
,
CC_idP
,
rx_ces
[
i
],
lcgid
,
payload_ptr
[
0
]
&
0x3f
);
if
(
UE_id
!=
-
1
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
lcgid
]
=
(
payload_ptr
[
0
]
&
0x3f
);
...
...
@@ -175,6 +179,15 @@ void rx_sdu(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID1
],
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID2
],
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]);
if
(
crnti_rx
==
1
)
LOG_I
(
MAC
,
"[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR LCGID0 = %u LCGID1 = "
"%u LCGID2 = %u LCGID3 = %u
\n
"
,
enb_mod_idP
,
CC_idP
,
rx_ces
[
i
],
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID0
],
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID1
],
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID2
],
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID3
]);
if
(
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
bsr_info
[
LCGID0
]
==
0
)
{
UE_list
->
UE_template
[
CC_idP
][
UE_id
].
ul_buffer_creation_time
[
LCGID0
]
=
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