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
canghaiwuhen
OpenXG-RAN
Commits
b60c3c95
Commit
b60c3c95
authored
9 years ago
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
phy test for UE first version
parent
392e38ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
84 deletions
+63
-84
openair1/PHY/defs.h
openair1/PHY/defs.h
+4
-0
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+0
-3
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+58
-77
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-4
No files found.
openair1/PHY/defs.h
View file @
b60c3c95
...
...
@@ -271,6 +271,7 @@ typedef struct PHY_VARS_eNB_s {
int
**
dl_precoder_SeNB
[
3
];
char
log2_maxp
;
/// holds the maximum channel/precoder coefficient
/// if ==0 enables phy only test mode
int
mac_enabled
;
/// For emulation only (used by UE abstraction to retrieve DCI)
...
...
@@ -574,6 +575,9 @@ typedef struct {
/// holds the maximum channel/precoder coefficient
char
log2_maxp
;
/// if ==0 enables phy only test mode
int
mac_enabled
;
/// Flag to initialize averaging of PHY measurements
int
init_averaging
;
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED/phy_procedures_lte_ue.c
View file @
b60c3c95
...
...
@@ -87,9 +87,6 @@ fifo_dump_emos_UE emos_dump_UE;
# endif
#endif
#ifndef OPENAIR2
//#define DIAG_PHY
#endif
#define DLSCH_RB_ALLOC 0x1fbf // skip DC RB (total 23/25 RBs)
#define DLSCH_RB_ALLOC_12 0x0aaa // skip DC RB (total 23/25 RBs)
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-softmodem.c
View file @
b60c3c95
...
...
@@ -291,6 +291,7 @@ double bw = 10.0e6;
static
int
tx_max_power
[
MAX_NUM_CCs
];
/* = {0,0}*/
;
int
chain_offset
=
0
;
int
phy_test
=
0
;
#ifndef EXMIMO
char
ref
[
128
]
=
"internal"
;
...
...
@@ -532,12 +533,12 @@ static void *scope_thread(void *arg)
0
,
7
);
}
else
{
#ifdef OPENAIR2
len
=
dump_eNB_l2_stats
(
stats_buffer
,
0
);
//fl_set_object_label(form_stats_l2->stats_text, stats_buffer);
fl_clear_browser
(
form_stats_l2
->
stats_text
);
fl_add_browser_line
(
form_stats_l2
->
stats_text
,
stats_buffer
);
#endif
if
(
PHY_vars_eNB_g
[
0
][
0
]
->
mac_enabled
==
1
)
{
len
=
dump_eNB_l2_stats
(
stats_buffer
,
0
);
//fl_set_object_label(form_stats_l2->stats_text, stats_buffer);
fl_clear_browser
(
form_stats_l2
->
stats_text
);
fl_add_browser_line
(
form_stats_l2
->
stats_text
,
stats_buffer
);
}
len
=
dump_eNB_stats
(
PHY_vars_eNB_g
[
0
][
0
],
stats_buffer
,
0
);
if
(
MAX_NUM_CCs
>
1
)
...
...
@@ -2063,7 +2064,8 @@ static void get_options (int argc, char **argv)
LONG_OPTION_SCANCARRIER
,
LONG_OPTION_MAXPOWER
,
LONG_OPTION_DUMP_FRAME
,
LONG_OPTION_LOOPMEMORY
LONG_OPTION_LOOPMEMORY
,
LONG_OPTION_PHYTEST
};
static
const
struct
option
long_options
[]
=
{
...
...
@@ -2080,6 +2082,7 @@ static void get_options (int argc, char **argv)
{
"ue-max-power"
,
required_argument
,
NULL
,
LONG_OPTION_MAXPOWER
},
{
"ue-dump-frame"
,
no_argument
,
NULL
,
LONG_OPTION_DUMP_FRAME
},
{
"loop-memory"
,
required_argument
,
NULL
,
LONG_OPTION_LOOPMEMORY
},
{
"phy-test"
,
no_argument
,
NULL
,
LONG_OPTION_PHYTEST
},
{
NULL
,
0
,
NULL
,
0
}
};
...
...
@@ -2152,6 +2155,10 @@ static void get_options (int argc, char **argv)
mode
=
rx_dump_frame
;
break
;
case
LONG_OPTION_PHYTEST
:
phy_test
=
1
;
break
;
case
'M'
:
#ifdef ETHERNET
strcpy
(
rrh_eNB_ip
,
optarg
);
...
...
@@ -2213,7 +2220,6 @@ static void get_options (int argc, char **argv)
case
't'
:
target_ul_mcs
=
atoi
(
optarg
);
break
;
#ifdef OPENAIR2
case
'W'
:
opt_enabled
=
1
;
...
...
@@ -2248,7 +2254,6 @@ static void get_options (int argc, char **argv)
}
break
;
#endif
case
'V'
:
ouput_vcd
=
1
;
...
...
@@ -2417,8 +2422,6 @@ static void get_options (int argc, char **argv)
}
#ifdef OPENAIR2
init_all_otg
(
0
);
g_otg
->
seed
=
0
;
init_seeds
(
g_otg
->
seed
);
...
...
@@ -2436,7 +2439,6 @@ static void get_options (int argc, char **argv)
init_predef_traffic
(
enb_properties
->
properties
[
i
]
->
num_otg_elements
,
1
);
#endif
glog_level
=
enb_properties
->
properties
[
i
]
->
glog_level
;
glog_verbosity
=
enb_properties
->
properties
[
i
]
->
glog_verbosity
;
...
...
@@ -2498,9 +2500,7 @@ int main( int argc, char **argv )
int
CC_id
;
uint16_t
Nid_cell
=
0
;
uint8_t
cooperation_flag
=
0
,
abstraction_flag
=
0
;
#ifndef OPENAIR2
uint8_t
beta_ACK
=
0
,
beta_RI
=
0
,
beta_CQI
=
2
;
#endif
#ifdef ENABLE_TCXO
unsigned
int
tcxo
=
114
;
...
...
@@ -2581,15 +2581,9 @@ int main( int argc, char **argv )
printf
(
"configuring for eNB
\n
"
);
set_comp_log
(
HW
,
hw_log_level
,
hw_log_verbosity
,
1
);
#ifdef OPENAIR2
set_comp_log
(
PHY
,
phy_log_level
,
phy_log_verbosity
,
1
);
if
(
opt_enabled
==
1
)
set_comp_log
(
OPT
,
opt_log_level
,
opt_log_verbosity
,
1
);
#else
set_comp_log
(
PHY
,
LOG_INFO
,
LOG_HIGH
,
1
);
#endif
set_comp_log
(
MAC
,
mac_log_level
,
mac_log_verbosity
,
1
);
set_comp_log
(
RLC
,
rlc_log_level
,
rlc_log_verbosity
,
1
);
set_comp_log
(
PDCP
,
pdcp_log_level
,
pdcp_log_verbosity
,
1
);
...
...
@@ -2645,8 +2639,6 @@ int main( int argc, char **argv )
MSC_INIT
(
MSC_E_UTRAN
,
THREAD_MAX
+
TASK_MAX
);
#endif
#ifdef OPENAIR2
if
(
opt_type
!=
OPT_NONE
)
{
radio_type_t
radio_type
;
...
...
@@ -2659,7 +2651,6 @@ int main( int argc, char **argv )
LOG_E
(
OPT
,
"failed to run OPT
\n
"
);
}
#endif
#ifdef PDCP_USE_NETLINK
netlink_init
();
#if defined(PDCP_USE_NETLINK_QUEUES)
...
...
@@ -2729,21 +2720,24 @@ int main( int argc, char **argv )
PHY_vars_UE_g
[
0
][
CC_id
]
=
init_lte_UE
(
frame_parms
[
CC_id
],
0
,
abstraction_flag
,
transmission_mode
);
UE
[
CC_id
]
=
PHY_vars_UE_g
[
0
][
CC_id
];
printf
(
"PHY_vars_UE_g[0][%d] = %p
\n
"
,
CC_id
,
UE
[
CC_id
]);
#ifndef OPENAIR2
for
(
i
=
0
;
i
<
NUMBER_OF_CONNECTED_eNB_MAX
;
i
++
)
{
UE
[
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_ACK_Index
=
beta_ACK
;
UE
[
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_RI_Index
=
beta_RI
;
UE
[
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_CQI_Index
=
beta_CQI
;
if
(
phy_test
==
1
)
UE
[
CC_id
]
->
mac_enabled
=
0
;
else
UE
[
CC_id
]
->
mac_enabled
=
1
;
UE
[
CC_id
]
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
=
0
;
UE
[
CC_id
]
->
scheduling_request_config
[
i
].
sr_ConfigIndex
=
7
+
(
0
%
3
);
UE
[
CC_id
]
->
scheduling_request_config
[
i
].
dsr_TransMax
=
sr_n4
;
if
(
UE
[
CC_id
]
->
mac_enabled
==
0
)
{
for
(
i
=
0
;
i
<
NUMBER_OF_CONNECTED_eNB_MAX
;
i
++
)
{
UE
[
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_ACK_Index
=
beta_ACK
;
UE
[
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_RI_Index
=
beta_RI
;
UE
[
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_CQI_Index
=
beta_CQI
;
UE
[
CC_id
]
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
=
0
;
UE
[
CC_id
]
->
scheduling_request_config
[
i
].
sr_ConfigIndex
=
7
+
(
0
%
3
);
UE
[
CC_id
]
->
scheduling_request_config
[
i
].
dsr_TransMax
=
sr_n4
;
}
}
#endif
UE
[
CC_id
]
->
UE_scan
=
UE_scan
;
UE
[
CC_id
]
->
UE_scan_carrier
=
UE_scan_carrier
;
UE
[
CC_id
]
->
mode
=
mode
;
...
...
@@ -2752,13 +2746,12 @@ int main( int argc, char **argv )
UE
[
CC_id
]
->
lte_frame_parms
.
frame_type
,
UE
[
CC_id
]
->
X_u
);
UE
[
CC_id
]
->
lte_ue_pdcch_vars
[
0
]
->
crnti
=
0x1234
;
#ifndef OPENAIR2
UE
[
CC_id
]
->
lte_ue_pdcch_vars
[
0
]
->
crnti
=
0x1235
;
#endif
if
(
UE
[
CC_id
]
->
mac_enabled
==
1
)
UE
[
CC_id
]
->
lte_ue_pdcch_vars
[
0
]
->
crnti
=
0x1234
;
else
UE
[
CC_id
]
->
lte_ue_pdcch_vars
[
0
]
->
crnti
=
0x1235
;
#ifdef EXMIMO
for
(
i
=
0
;
i
<
4
;
i
++
)
{
UE
[
CC_id
]
->
rx_gain_max
[
i
]
=
rxg_max
[
i
];
UE
[
CC_id
]
->
rx_gain_med
[
i
]
=
rxg_med
[
i
];
...
...
@@ -2792,9 +2785,7 @@ int main( int argc, char **argv )
UE
[
CC_id
]
->
tx_power_max_dBm
=
tx_max_power
[
CC_id
];
#ifdef EXMIMO
//N_TA_offset
if
(
UE
[
CC_id
]
->
lte_frame_parms
.
frame_type
==
TDD
)
{
if
(
UE
[
CC_id
]
->
lte_frame_parms
.
N_RB_DL
==
100
)
...
...
@@ -2806,7 +2797,6 @@ int main( int argc, char **argv )
}
else
{
UE
[
CC_id
]
->
N_TA_offset
=
0
;
}
#else
//already taken care of in lte-softmodem
UE
[
CC_id
]
->
N_TA_offset
=
0
;
...
...
@@ -2830,20 +2820,23 @@ int main( int argc, char **argv )
PHY_vars_eNB_g
[
0
][
CC_id
]
=
init_lte_eNB
(
frame_parms
[
CC_id
],
0
,
frame_parms
[
CC_id
]
->
Nid_cell
,
cooperation_flag
,
transmission_mode
,
abstraction_flag
);
PHY_vars_eNB_g
[
0
][
CC_id
]
->
CC_id
=
CC_id
;
#ifndef OPENAIR2
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_ACK_Index
=
beta_ACK
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_RI_Index
=
beta_RI
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_CQI_Index
=
beta_CQI
;
if
(
phy_test
==
1
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
mac_enabled
=
0
;
else
PHY_vars_eNB_g
[
0
][
CC_id
]
->
mac_enabled
=
1
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
=
i
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
scheduling_request_config
[
i
].
sr_ConfigIndex
=
7
+
(
i
%
3
);
PHY_vars_eNB_g
[
0
][
CC_id
]
->
scheduling_request_config
[
i
].
dsr_TransMax
=
sr_n4
;
if
(
PHY_vars_eNB_g
[
0
][
CC_id
]
->
mac_enabled
==
0
)
{
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_ACK_Index
=
beta_ACK
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_RI_Index
=
beta_RI
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
pusch_config_dedicated
[
i
].
betaOffset_CQI_Index
=
beta_CQI
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
scheduling_request_config
[
i
].
sr_PUCCH_ResourceIndex
=
i
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
scheduling_request_config
[
i
].
sr_ConfigIndex
=
7
+
(
i
%
3
);
PHY_vars_eNB_g
[
0
][
CC_id
]
->
scheduling_request_config
[
i
].
dsr_TransMax
=
sr_n4
;
}
}
#endif
compute_prach_seq
(
&
PHY_vars_eNB_g
[
0
][
CC_id
]
->
lte_frame_parms
.
prach_config_common
,
PHY_vars_eNB_g
[
0
][
CC_id
]
->
lte_frame_parms
.
frame_type
,
PHY_vars_eNB_g
[
0
][
CC_id
]
->
X_u
);
...
...
@@ -3044,16 +3037,12 @@ int main( int argc, char **argv )
mac_xface
=
malloc
(
sizeof
(
MAC_xface
));
#ifdef OPENAIR2
int
eMBMS_active
=
0
;
l2_init
(
frame_parms
[
0
],
eMBMS_active
,(
uecap_xer_in
==
1
)
?
uecap_xer
:
NULL
,
0
,
// cba_group_active
0
);
// HO flag
#endif
0
,
// cba_group_active
0
);
// HO flag
mac_xface
->
macphy_exit
=
&
exit_fun
;
#if defined(ENABLE_ITTI)
...
...
@@ -3066,15 +3055,14 @@ int main( int argc, char **argv )
printf
(
"ITTI tasks created
\n
"
);
#endif
#ifdef OPENAIR2
if
(
UE_flag
==
1
)
{
printf
(
"Filling UE band info
\n
"
);
fill_ue_band_info
();
mac_xface
->
dl_phy_sync_success
(
0
,
0
,
0
,
1
);
}
else
mac_xface
->
mrbch_phy_sync_failure
(
0
,
0
,
0
);
#endif
if
(
phy_test
==
0
)
{
if
(
UE_flag
==
1
)
{
printf
(
"Filling UE band info
\n
"
);
fill_ue_band_info
();
mac_xface
->
dl_phy_sync_success
(
0
,
0
,
0
,
1
);
}
else
mac_xface
->
mrbch_phy_sync_failure
(
0
,
0
,
0
);
}
/* #ifdef OPENAIR2
//if (otg_enabled) {
...
...
@@ -3466,9 +3454,6 @@ int main( int argc, char **argv )
}
}
#ifdef OPENAIR2
//cleanup_pdcp_thread();
#endif
#ifdef RTAI
stop_rt_timer
();
...
...
@@ -3503,13 +3488,9 @@ int main( int argc, char **argv )
if
(
ouput_vcd
)
VCD_SIGNAL_DUMPER_CLOSE
();
#ifdef OPENAIR2
if
(
opt_enabled
==
1
)
terminate_opt
();
#endif
logClean
();
return
0
;
...
...
This diff is collapsed.
Click to expand it.
targets/RT/USER/lte-ue.c
View file @
b60c3c95
...
...
@@ -925,9 +925,7 @@ static void *UE_thread_rx(void *arg)
phy_procedures_UE_RX
(
UE
,
0
,
0
,
UE
->
mode
,
no_relay
,
NULL
);
}
#ifdef OPENAIR2
if
(
i
==
0
)
{
if
((
UE
->
mac_enabled
==
1
)
&&
(
i
==
0
))
{
ret
=
mac_xface
->
ue_scheduler
(
UE
->
Mod_id
,
UE
->
frame_tx
,
UE
->
slot_rx
>>
1
,
...
...
@@ -950,7 +948,6 @@ static void *UE_thread_rx(void *arg)
}
}
#endif
UE
->
slot_rx
++
;
if
(
UE
->
slot_rx
==
20
)
{
...
...
This diff is collapsed.
Click to expand it.
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