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
ZhouShuya
OpenXG-RAN
Commits
ea65ddad
Commit
ea65ddad
authored
Dec 11, 2017
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fill PHY_vars_eNB_g in own function
parent
1aa5d293
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
54 deletions
+66
-54
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+66
-54
No files found.
targets/RT/USER/lte-softmodem.c
View file @
ea65ddad
...
...
@@ -1423,6 +1423,70 @@ void init_openair0() {
}
}
void
fill_PHY_vars_eNB_g
(
uint8_t
abstraction_flag
,
uint8_t
beta_ACK
,
uint8_t
beta_RI
,
uint8_t
beta_CQI
)
{
int
CC_id
,
i
,
j
,
k
,
re
;
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
=
init_lte_eNB
(
frame_parms
[
CC_id
],
0
,
frame_parms
[
CC_id
]
->
Nid_cell
,
node_function
[
CC_id
],
abstraction_flag
);
PHY_vars_eNB_g
[
0
][
CC_id
]
->
ue_dl_rb_alloc
=
0x1fff
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
target_ue_dl_mcs
=
target_dl_mcs
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
ue_ul_nb_rb
=
6
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
target_ue_ul_mcs
=
target_ul_mcs
;
// initialization for phy-test
for
(
k
=
0
;
k
<
NUMBER_OF_UE_MAX
;
k
++
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
->
transmission_mode
[
k
]
=
transmission_mode
;
if
(
transmission_mode
==
7
)
lte_gold_ue_spec_port5
(
PHY_vars_eNB_g
[
0
][
CC_id
]
->
lte_gold_uespec_port5_table
[
k
],
frame_parms
[
CC_id
]
->
Nid_cell
,
0x1235
+
k
);
}
if
((
transmission_mode
==
1
)
||
(
transmission_mode
==
7
))
{
for
(
j
=
0
;
j
<
frame_parms
[
CC_id
]
->
nb_antennas_tx
;
j
++
)
for
(
re
=
0
;
re
<
frame_parms
[
CC_id
]
->
ofdm_symbol_size
;
re
++
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
common_vars
.
beam_weights
[
0
][
0
][
j
][
re
]
=
0x00007fff
/
frame_parms
[
CC_id
]
->
nb_antennas_tx
;
}
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
;
if
(
PHY_vars_eNB_g
[
0
][
CC_id
]
->
mac_enabled
==
0
)
{
//set default parameters for testing mode
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
;
}
}
compute_prach_seq
(
&
PHY_vars_eNB_g
[
0
][
CC_id
]
->
frame_parms
.
prach_config_common
,
PHY_vars_eNB_g
[
0
][
CC_id
]
->
frame_parms
.
frame_type
,
PHY_vars_eNB_g
[
0
][
CC_id
]
->
X_u
);
PHY_vars_eNB_g
[
0
][
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
];
if
(
frame_parms
[
CC_id
]
->
frame_type
==
FDD
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
0
;
}
else
{
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
100
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
;
else
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
50
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
/
2
;
else
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
25
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
/
4
;
}
}
}
/* check the state : either continue or wait for a command to start/stop the eNB
* if needed override the current configuration parameters, such as
* frequencies, bands, power, bandwidth
...
...
@@ -1437,7 +1501,7 @@ static void ltesm_wait_reconfig_cmd(void)
}
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
,
k
,
aa
,
re
;
int
i
,
aa
;
#if defined (XFORMS)
void
*
status
;
#endif
...
...
@@ -1710,59 +1774,7 @@ int main( int argc, char **argv ) {
PHY_vars_eNB_g
=
malloc
(
sizeof
(
PHY_VARS_eNB
**
));
PHY_vars_eNB_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_eNB
*
));
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
=
init_lte_eNB
(
frame_parms
[
CC_id
],
0
,
frame_parms
[
CC_id
]
->
Nid_cell
,
node_function
[
CC_id
],
abstraction_flag
);
PHY_vars_eNB_g
[
0
][
CC_id
]
->
ue_dl_rb_alloc
=
0x1fff
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
target_ue_dl_mcs
=
target_dl_mcs
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
ue_ul_nb_rb
=
6
;
PHY_vars_eNB_g
[
0
][
CC_id
]
->
target_ue_ul_mcs
=
target_ul_mcs
;
// initialization for phy-test
for
(
k
=
0
;
k
<
NUMBER_OF_UE_MAX
;
k
++
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
->
transmission_mode
[
k
]
=
transmission_mode
;
if
(
transmission_mode
==
7
)
lte_gold_ue_spec_port5
(
PHY_vars_eNB_g
[
0
][
CC_id
]
->
lte_gold_uespec_port5_table
[
k
],
frame_parms
[
CC_id
]
->
Nid_cell
,
0x1235
+
k
);
}
if
((
transmission_mode
==
1
)
||
(
transmission_mode
==
7
))
{
for
(
j
=
0
;
j
<
frame_parms
[
CC_id
]
->
nb_antennas_tx
;
j
++
)
for
(
re
=
0
;
re
<
frame_parms
[
CC_id
]
->
ofdm_symbol_size
;
re
++
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
common_vars
.
beam_weights
[
0
][
0
][
j
][
re
]
=
0x00007fff
/
frame_parms
[
CC_id
]
->
nb_antennas_tx
;
}
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
;
if
(
PHY_vars_eNB_g
[
0
][
CC_id
]
->
mac_enabled
==
0
)
{
//set default parameters for testing mode
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
;
}
}
compute_prach_seq
(
&
PHY_vars_eNB_g
[
0
][
CC_id
]
->
frame_parms
.
prach_config_common
,
PHY_vars_eNB_g
[
0
][
CC_id
]
->
frame_parms
.
frame_type
,
PHY_vars_eNB_g
[
0
][
CC_id
]
->
X_u
);
PHY_vars_eNB_g
[
0
][
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
];
if
(
frame_parms
[
CC_id
]
->
frame_type
==
FDD
)
{
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
0
;
}
else
{
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
100
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
;
else
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
50
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
/
2
;
else
if
(
frame_parms
[
CC_id
]
->
N_RB_DL
==
25
)
PHY_vars_eNB_g
[
0
][
CC_id
]
->
N_TA_offset
=
624
/
4
;
}
}
fill_PHY_vars_eNB_g
(
abstraction_flag
,
beta_ACK
,
beta_RI
,
beta_CQI
);
NB_eNB_INST
=
1
;
NB_INST
=
1
;
...
...
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