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
56c6c3ee
Commit
56c6c3ee
authored
Dec 17, 2019
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unitary simulators all compile
parent
6b8c8a3b
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
2336 additions
and
2709 deletions
+2336
-2709
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+5
-3
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h
+2
-2
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+53
-205
openair1/SCHED_NR_UE/defs.h
openair1/SCHED_NR_UE/defs.h
+2
-6
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+45
-43
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+242
-399
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
+2
-1
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
+8
-7
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+8
-44
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+15
-19
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+12
-14
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+0
-37
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+2
-37
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+2
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+1938
-1890
No files found.
cmake_targets/CMakeLists.txt
View file @
56c6c3ee
...
...
@@ -2627,12 +2627,14 @@ target_link_libraries(nr_dlsim
add_executable
(
nr_prachsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/prachsim.c
${
OPENAIR_DIR
}
/common/utils/backtrace.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
OPENAIR_DIR
}
/common/utils/nr/nr_common.c
${
OPENAIR1_DIR
}
/SCHED_NR/phy_procedures_nr_common.c
${
T_SOURCE
}
)
target_link_libraries
(
nr_prachsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
dl
)
${
UTIL_SRC
}
${
T_SOURCE
}
${
SHLIB_LOADER_SOURCES
}
)
target_link_libraries
(
nr_prachsim
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB -Wl,--end-group m pthread
${
ATLAS_LIBRARIES
}
${
T_LIB
}
${
ITTI_LIB
}
dl
)
add_executable
(
nr_ulschsim
${
OPENAIR1_DIR
}
/SIMULATION/NR_PHY/ulschsim.c
...
...
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_constants.h
View file @
56c6c3ee
...
...
@@ -51,8 +51,8 @@
#define FAPI_NR_UL_CONFIG_LIST_NUM 10
#define FAPI_NR_UL_CONFIG_TYPE_PRACH 0x01
#define FAPI_NR_UL_CONFIG_TYPE_
UCI
0x02
#define FAPI_NR_UL_CONFIG_TYPE_
UL
SCH 0x03
#define FAPI_NR_UL_CONFIG_TYPE_
PUCCH
0x02
#define FAPI_NR_UL_CONFIG_TYPE_
PU
SCH 0x03
#define FAPI_NR_UL_CONFIG_TYPE_SRS 0x04
...
...
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
56c6c3ee
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR_UE/defs.h
View file @
56c6c3ee
...
...
@@ -121,10 +121,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t e
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
@param phy_vars_rn pointer to RN variables
*/
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
do_pdcch_flag
,
runmode_t
mode
,
fapi_nr_dl_config_request_t
*
DLconfigreq
);
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
do_pdcch_flag
,
runmode_t
mode
);
int
phy_procedures_slot_parallelization_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
abstraction_flag
,
uint8_t
do_pdcch_flag
,
runmode_t
mode
,
relaying_type_t
r_type
);
...
...
@@ -373,11 +370,10 @@ void nr_compute_srs_pos(lte_frame_type_t frameType,uint16_t isrs,uint16_t *psrsP
void
set_tx_harq_id
(
NR_UE_ULSCH_t
*
ulsch
,
int
harq_pid
,
int
slot_tx
);
int
get_tx_harq_id
(
NR_UE_ULSCH_t
*
ulsch
,
int
slot_tx
);
fapi_nr_dl_config_bch_pdu
*
is_pbch_in_slot
(
fapi_nr_dl_config_request_t
*
DLconfigreq
,
int
frame
,
int
slot
,
int
periodicity
,
uint16_t
slots_per_frame
);
int
is_pbch_in_slot
(
fapi_nr_pbch_config_t
*
pbch_config
,
int
frame
,
int
slot
,
int
periodicity
,
uint16_t
slots_per_frame
);
/*@}*/
#endif
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
56c6c3ee
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
56c6c3ee
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR_UE/pucch_power_control_ue_nr.c
View file @
56c6c3ee
...
...
@@ -103,7 +103,7 @@ int16_t get_pucch_tx_power_ue(PHY_VARS_NR_UE *ue,
int
P_O_PUCCH
=
P_O_NOMINAL_PUCCH
+
P_O_UE_PUCCH
;
int16_t
PL
=
get_nr_PL
(
ue
,
gNB_id
);
/* LTE function because NR path loss not yet implemented FFS TODO NR */
int16_t
PL
=
100
;
//get_PL(ue->Mod_id, ue->CC_id,
gNB_id); /* LTE function because NR path loss not yet implemented FFS TODO NR */
int16_t
delta_F_PUCCH
=
power_config
->
deltaF_PUCCH_f
[
pucch_format
];
...
...
@@ -214,3 +214,4 @@ int16_t get_pucch_tx_power_ue(PHY_VARS_NR_UE *ue,
return
(
pucch_power
);
}
openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
View file @
56c6c3ee
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
/* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
...
...
@@ -53,6 +52,8 @@
uint8_t
is_cqi_TXOp
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
);
uint8_t
is_ri_TXOp
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
);
/*
void nr_generate_pucch0(int32_t **txdataF,
NR_DL_FRAME_PARMS *frame_parms,
...
...
@@ -109,9 +110,8 @@ void nr_generate_pucch3_4(int32_t **txdataF,
/**************** functions **************************************/
uint8_t
is_nr_cqi_TXOp
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
)
{
return
(
0
);
}
uint8_t
is_nr_ri_TXOp
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
)
{
return
(
0
);}
//extern uint8_t is_cqi_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id);
//extern uint8_t is_ri_TXOp(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id);
/*******************************************************************
*
* NAME : pucch_procedures_ue_nr
...
...
@@ -226,10 +226,10 @@ bool pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_
&
n_HARQ_ACK
,
reset_harq
);
// 1 to reset ACK/NACK status : 0 otherwise
cqi_status
=
((
ue
->
cqi_report_config
[
gNB_id
].
CQI_ReportPeriodic
.
cqi_PMI_ConfigIndex
>
0
)
&&
(
is_
nr_
cqi_TXOp
(
ue
,
proc
,
gNB_id
)
==
1
));
(
is_cqi_TXOp
(
ue
,
proc
,
gNB_id
)
==
1
));
ri_status
=
((
ue
->
cqi_report_config
[
gNB_id
].
CQI_ReportPeriodic
.
ri_ConfigIndex
>
0
)
&&
(
is_
nr_
ri_TXOp
(
ue
,
proc
,
gNB_id
)
==
1
));
(
is_ri_TXOp
(
ue
,
proc
,
gNB_id
)
==
1
));
csi_status
=
get_csi_nr
(
ue
,
gNB_id
,
&
csi_payload
);
...
...
@@ -1214,3 +1214,4 @@ void set_csi_nr(int csi_status, uint32_t csi_payload)
}
}
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
56c6c3ee
...
...
@@ -59,43 +59,6 @@ double cpuf;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
int
oai_nfapi_hi_dci0_req
(
nfapi_hi_dci0_request_t
*
hi_dci0_req
)
{
return
(
0
);
}
int
oai_nfapi_tx_req
(
nfapi_tx_request_t
*
tx_req
)
{
return
(
0
);
}
int
oai_nfapi_dl_config_req
(
nfapi_dl_config_request_t
*
dl_config_req
)
{
return
(
0
);
}
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
)
{
return
(
0
);
}
int
oai_nfapi_nr_dl_config_req
(
nfapi_nr_dl_config_request_t
*
dl_config_req
)
{
return
(
0
);
}
uint32_t
from_nrarfcn
(
int
nr_bandP
,
uint32_t
dl_earfcn
)
{
return
(
0
);
}
int32_t
get_nr_uldl_offset
(
int
eutra_bandP
)
{
return
(
0
);
}
NR_IF_Module_t
*
NR_IF_Module_init
(
int
Mod_id
)
{
return
(
NULL
);
}
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
const
char
*
msg
=
s
==
NULL
?
"no comment"
:
s
;
printf
(
"Exiting at: %s:%d %s(), %s
\n
"
,
file
,
line
,
function
,
msg
);
exit
(
-
1
);
}
// needed for some functions
...
...
@@ -460,7 +423,7 @@ int main(int argc, char **argv)
UE
->
dlsch_ra
[
0
]
=
new_nr_ue_dlsch
(
1
,
1
,
Nsoft
,
5
,
N_RB_DL
,
0
);
unsigned
char
harq_pid
=
0
;
//dlsch->harq_ids[subframe];
NR_gNB_DLSCH_t
*
dlsch
=
gNB
->
dlsch
[
0
][
0
];
nfapi_nr_dl_
config_dlsch_pdu_rel15_t
*
rel15
=
&
dlsch
->
harq_processes
[
harq_pid
]
->
dlsch_pdu
.
dl
sch_pdu_rel15
;
nfapi_nr_dl_
tti_pdsch_pdu_rel15_t
*
rel15
=
&
dlsch
->
harq_processes
[
harq_pid
]
->
pdsch_pdu
.
pd
sch_pdu_rel15
;
//time_stats_t *rm_stats, *te_stats, *i_stats;
uint8_t
is_crnti
=
0
,
llr8_flag
=
0
;
unsigned
int
TBS
=
8424
;
...
...
@@ -482,12 +445,13 @@ int main(int argc, char **argv)
TBS
=
nr_compute_tbs
(
mod_order
,
rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
Nl
);
printf
(
"available bits %u TBS %u mod_order %d
\n
"
,
available_bits
,
TBS
,
mod_order
);
//dlsch->harq_ids[subframe]= 0;
rel15
->
n_prb
=
nb_rb
;
rel15
->
nb_symbols
=
nb_symb_sch
;
rel15
->
modulation_order
=
mod_order
;
rel15
->
nb_layers
=
Nl
;
rel15
->
transport_block_size
=
TBS
;
rel15
->
coding_rate
=
rate
;
rel15
->
rbSize
=
nb_rb
;
rel15
->
NrOfSymbols
=
nb_symb_sch
;
rel15
->
qamModOrder
[
0
]
=
mod_order
;
rel15
->
nrOfLayers
=
Nl
;
rel15
->
TBSize
[
0
]
=
TBS
;
rel15
->
targetCodeRate
[
0
]
=
rate
;
rel15
->
NrOfCodewords
=
1
;
double
*
modulated_input
=
malloc16
(
sizeof
(
double
)
*
16
*
68
*
384
);
// [hna] 16 segments, 68*Zc
short
*
channel_output_fixed
=
malloc16
(
sizeof
(
short
)
*
16
*
68
*
384
);
short
*
channel_output_uncoded
=
malloc16
(
sizeof
(
unsigned
short
)
*
16
*
68
*
384
);
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
56c6c3ee
...
...
@@ -92,8 +92,8 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
uint16_t
NB_UE_INST
=
1
;
//Dummy Functions
lte_subframe_t
subframe_select
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
unsigned
char
subframe
)
{
return
(
SF_DL
);}
int
rlc_module_init
(
vo
id
)
{
return
(
0
);}
//
lte_subframe_t subframe_select(LTE_DL_FRAME_PARMS *frame_parms, unsigned char subframe) {return(SF_DL);}
int
rlc_module_init
(
int
eNB_
id
)
{
return
(
0
);}
void
pdcp_layer_init
(
void
)
{}
...
...
@@ -195,7 +195,7 @@ int main(int argc, char **argv)
//double pbch_sinr;
//int pbch_tx_ant;
int
N_RB_DL
=
106
,
mu
=
1
;
nfapi_nr_dl_
config_dl
sch_pdu_rel15_t
dlsch_config
;
nfapi_nr_dl_
tti_pd
sch_pdu_rel15_t
dlsch_config
;
uint16_t
ssb_periodicity
=
10
;
...
...
@@ -662,7 +662,7 @@ int main(int argc, char **argv)
// generate signal
if
(
input_fd
==
NULL
)
{
gNB
->
pbch_configured
=
1
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
gNB
->
pbch_pdu
[
i
]
=
i
+
1
;
gNB
->
ssb_pdu
.
ssb_pdu_rel15
.
bchPayload
=
0x001234
;
if
(
css_flag
==
0
)
nr_schedule_uss_dlsch_phytest
(
0
,
frame
,
slot
,
&
dlsch_config
);
else
nr_schedule_css_dlsch_phytest
(
0
,
frame
,
slot
);
...
...
@@ -674,7 +674,7 @@ int main(int argc, char **argv)
Sched_INFO
.
slot
=
slot
;
Sched_INFO
.
DL_req
=
&
gNB_mac
->
DL_req
[
0
];
Sched_INFO
.
UL_tti_req
=
&
gNB_mac
->
UL_tti_req
[
0
];
Sched_INFO
.
HI_DCI0
_req
=
NULL
;
Sched_INFO
.
UL_dci
_req
=
NULL
;
Sched_INFO
.
TX_req
=
&
gNB_mac
->
TX_req
[
0
];
nr_schedule_response
(
&
Sched_INFO
);
...
...
@@ -761,8 +761,10 @@ int main(int argc, char **argv)
dl_config
->
dl_config_list
[
0
].
dci_config_pdu
.
dci_config_rel15
.
rnti
=
0x1234
;
uint64_t
mask
=
0x0
;
uint16_t
num_rbs
=
24
;
uint16_t
rb_offset
=
gNB
->
pdcch_vars
.
dci_alloc
[
0
].
pdcch_params
.
rb_offset
;
uint16_t
num_rbs
;
uint16_t
rb_offset
;
get_coreset_rballoc
(
gNB
->
pdcch_pdu
->
pdcch_pdu_rel15
.
FreqDomainResource
,
&
num_rbs
,
&
rb_offset
);
uint16_t
cell_id
=
0
;
uint16_t
num_symbols
=
2
;
for
(
i
=
0
;
i
<
(
num_rbs
/
6
);
++
i
){
// 38.331 Each bit corresponds a group of 6 RBs
...
...
@@ -859,13 +861,11 @@ int main(int argc, char **argv)
nr_ue_scheduled_response
(
&
UE_mac
->
scheduled_response
);
printf
(
"Running phy procedures UE RX %d.%d
\n
"
,
frame
,
slot
);
phy_procedures_nrUE_RX
(
UE
,
&
UE_proc
,
0
,
do_pdcch_flag
,
normal_txrx
,
&
UE_mac
->
dl_config_request
);
phy_procedures_nrUE_RX
(
UE
,
&
UE_proc
,
0
,
do_pdcch_flag
,
normal_txrx
);
if
(
n_trials
==
1
)
{
LOG_M
(
"rxsigF0.m"
,
"rxsF0"
,
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
0
].
rxdataF
[
0
],
slot_length_complex_samples_no_prefix
,
1
,
1
);
...
...
@@ -873,10 +873,6 @@ int main(int argc, char **argv)
LOG_M
(
"rxsigF1.m"
,
"rxsF1"
,
UE
->
common_vars
.
common_vars_rx_data_per_thread
[
0
].
rxdataF
[
1
],
slot_length_complex_samples_no_prefix
,
1
,
1
);
}
if
(
UE_mac
->
dl_config_request
.
number_pdus
==
0
)
n_errors
++
;
if
(
UE
->
dlsch
[
UE
->
current_thread_id
[
slot
]][
0
][
0
]
->
last_iteration_cnt
>=
UE
->
dlsch
[
UE
->
current_thread_id
[
slot
]][
0
][
0
]
->
max_ldpc_iterations
+
1
)
n_errors
++
;
...
...
@@ -894,7 +890,7 @@ int main(int argc, char **argv)
NR_UE_PDSCH
**
pdsch_vars
=
UE
->
pdsch_vars
[
UE
->
current_thread_id
[
UE_proc
.
nr_tti_rx
]];
int16_t
*
UE_llr
=
pdsch_vars
[
0
]
->
llr
[
0
];
nfapi_nr_dl_
config_dlsch_pdu_rel15_t
rel15
=
gNB_dlsch
->
harq_processes
[
harq_pid
]
->
dlsch_pdu
.
dl
sch_pdu_rel15
;
nfapi_nr_dl_
tti_pdsch_pdu_rel15_t
rel15
=
gNB_dlsch
->
harq_processes
[
harq_pid
]
->
pdsch_pdu
.
pd
sch_pdu_rel15
;
uint32_t
TBS
=
rel15
.
TBSize
[
0
];
uint16_t
length_dmrs
=
1
;
uint16_t
nb_rb
=
rel15
.
rbSize
;
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
56c6c3ee
...
...
@@ -50,7 +50,7 @@
PHY_VARS_gNB
*
gNB
;
PHY_VARS_NR_UE
*
UE
;
RAN_CONTEXT_t
RC
;
RU_t
*
RU
;
RU_t
*
ru
;
double
cpuf
;
...
...
@@ -58,6 +58,9 @@ extern uint16_t prach_root_sequence_map0_3[838];
void
dump_nr_prach_config
(
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
);
uint16_t
NB_UE_INST
=
1
;
volatile
int
oai_exit
=
0
;
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
const
char
*
msg
=
s
==
NULL
?
"no comment"
:
s
;
printf
(
"Exiting at: %s:%d %s(), %s
\n
"
,
file
,
line
,
function
,
msg
);
...
...
@@ -70,8 +73,6 @@ int8_t nr_ue_get_SR(module_id_t module_idP, int CC_id, frame_t frameP, uint8_t e
return
0
;
}
int32_t
get_nr_uldl_offset
(
int
nr_bandP
)
{
return
(
0
);}
int
oai_nfapi_rach_ind
(
nfapi_rach_indication_t
*
rach_ind
)
{
return
(
0
);}
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
...
...
@@ -79,9 +80,6 @@ int nfapi_mode=0;
NR_IF_Module_t
*
NR_IF_Module_init
(
int
Mod_id
){
return
(
NULL
);}
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
)
{
return
(
0
);
}
int
oai_nfapi_nr_dl_config_req
(
nfapi_nr_dl_config_request_t
*
dl_config_req
)
{
return
(
0
);}
int
oai_nfapi_tx_req
(
nfapi_tx_request_t
*
tx_req
)
{
return
(
0
);
}
uint32_t
from_nrarfcn
(
int
nr_bandP
,
uint32_t
dl_nrarfcn
)
{
return
(
0
);}
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -132,7 +130,7 @@ int main(int argc, char **argv)
cpuf
=
get_cpu_freq_GHz
();
if
(
load_configmodule
(
argc
,
argv
)
==
0
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[SOFTMODEM] Error, configuration module init failed
\n
"
);
}
...
...
@@ -358,7 +356,7 @@ int main(int argc, char **argv)
RC
.
nb_RU
=
1
;
gNB
=
RC
.
gNB
[
0
];
RU
=
RC
.
ru
[
0
];
ru
=
RC
.
ru
[
0
];
if
(
ue_speed1set
==
0
)
{
...
...
@@ -397,10 +395,10 @@ int main(int argc, char **argv)
printf
(
"FFT Size %d, Extended Prefix %d, Samples per subframe %d,Frame type %s, Frequency Range %s
\n
"
,
NUMBER_OF_OFDM_CARRIERS
,
frame_parms
->
Ncp
,
frame_parms
->
samples_per_slot
<<
1
,
frame_parms
->
frame_type
==
FDD
?
"FDD"
:
"TDD"
,
frame_parms
->
freq_range
==
nr_FR1
?
"FR1"
:
"FR2"
);
RU
->
nr_frame_parms
=
frame_parms
;
RU
->
if_south
=
LOCAL_RF
;
RU
->
nb_tx
=
n_tx
;
RU
->
nb_rx
=
n_rx
;
ru
->
nr_frame_parms
=
frame_parms
;
ru
->
if_south
=
LOCAL_RF
;
ru
->
nb_tx
=
n_tx
;
ru
->
nb_rx
=
n_rx
;
RC
.
nb_nr_L1_inst
=
1
;
phy_init_nr_gNB
(
gNB
,
0
,
0
);
...
...
@@ -480,7 +478,7 @@ int main(int argc, char **argv)
gNB
->
proc
.
slot_rx
=
subframe
<<
1
;
gNB
->
common_vars
.
rxdata
=
RU
->
common
.
rxdata
;
gNB
->
common_vars
.
rxdata
=
ru
->
common
.
rxdata
;
compute_nr_prach_seq
(
gNB
->
frame_parms
.
prach_config_common
.
rootSequenceIndex
,
...
...
@@ -595,7 +593,7 @@ nr_ue_prach_procedures(UE,&proc,0,0,0);
rx_nr_prach_ru
(
RU
,
0
,
subframe
);
gNB
->
prach_vars
.
rxsigF
=
RU
->
prach_rxsigF
;
gNB
->
prach_vars
.
rxsigF
=
ru
->
prach_rxsigF
;
rx_nr_prach
(
gNB
,
0
,
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
56c6c3ee
...
...
@@ -58,43 +58,6 @@ double cpuf;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
int
oai_nfapi_hi_dci0_req
(
nfapi_hi_dci0_request_t
*
hi_dci0_req
)
{
return
(
0
);
}
int
oai_nfapi_tx_req
(
nfapi_tx_request_t
*
tx_req
)
{
return
(
0
);
}
int
oai_nfapi_dl_config_req
(
nfapi_dl_config_request_t
*
dl_config_req
)
{
return
(
0
);
}
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
)
{
return
(
0
);
}
int
oai_nfapi_nr_dl_config_req
(
nfapi_nr_dl_config_request_t
*
dl_config_req
)
{
return
(
0
);
}
uint32_t
from_nrarfcn
(
int
nr_bandP
,
uint32_t
dl_earfcn
)
{
return
(
0
);
}
int32_t
get_nr_uldl_offset
(
int
eutra_bandP
)
{
return
(
0
);
}
NR_IF_Module_t
*
NR_IF_Module_init
(
int
Mod_id
)
{
return
(
NULL
);
}
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
const
char
*
msg
=
s
==
NULL
?
"no comment"
:
s
;
printf
(
"Exiting at: %s:%d %s(), %s
\n
"
,
file
,
line
,
function
,
msg
);
exit
(
-
1
);
}
// needed for some functions
PHY_VARS_NR_UE
*
PHY_vars_UE_g
[
1
][
1
]
=
{
{
NULL
}
};
uint16_t
n_rnti
=
0x1234
;
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
56c6c3ee
...
...
@@ -67,41 +67,6 @@ double cpuf;
int
nfapi_mode
=
0
;
uint16_t
NB_UE_INST
=
1
;
int
oai_nfapi_hi_dci0_req
(
nfapi_hi_dci0_request_t
*
hi_dci0_req
)
{
return
(
0
);
}
int
oai_nfapi_tx_req
(
nfapi_tx_request_t
*
tx_req
)
{
return
(
0
);
}
int
oai_nfapi_dl_config_req
(
nfapi_dl_config_request_t
*
dl_config_req
)
{
return
(
0
);
}
int
oai_nfapi_ul_config_req
(
nfapi_ul_config_request_t
*
ul_config_req
)
{
return
(
0
);
}
int
oai_nfapi_nr_dl_config_req
(
nfapi_nr_dl_config_request_t
*
dl_config_req
)
{
return
(
0
);
}
int32_t
get_uldl_offset
(
int
eutra_bandP
)
{
return
(
0
);
}
NR_IF_Module_t
*
NR_IF_Module_init
(
int
Mod_id
)
{
return
(
NULL
);
}
void
exit_function
(
const
char
*
file
,
const
char
*
function
,
const
int
line
,
const
char
*
s
)
{
const
char
*
msg
=
s
==
NULL
?
"no comment"
:
s
;
printf
(
"Exiting at: %s:%d %s(), %s
\n
"
,
file
,
line
,
function
,
msg
);
exit
(
-
1
);
}
// dummy functions
int8_t
nr_mac_rrc_data_ind_ue
(
const
module_id_t
module_id
,
const
int
CC_id
,
const
uint8_t
gNB_index
,
const
int8_t
channel
,
const
uint8_t
*
pduP
,
const
sdu_size_t
pdu_len
)
{
return
0
;
}
void
mac_rlc_data_ind
(
const
module_id_t
module_idP
,
...
...
@@ -537,8 +502,8 @@ int main(int argc, char **argv)
///////////////////////////////////////////////////
*/
UL_tti_req
->
sfn
=
frame
;
UL_tti_req
->
s
lot
=
slot
;
UL_tti_req
->
SFN
=
frame
;
UL_tti_req
->
S
lot
=
slot
;
UL_tti_req
->
n_pdus
=
1
;
UL_tti_req
->
pdus_list
[
0
].
pdu_type
=
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
;
UL_tti_req
->
pdus_list
[
0
].
pdu_size
=
sizeof
(
nfapi_nr_pusch_pdu_t
);
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
56c6c3ee
...
...
@@ -42,9 +42,8 @@ void config_common_ue(NR_UE_MAC_INST_t *mac) {
fapi_nr_config_request_t
*
cfg
=
&
mac
->
phy_config
.
config_req
;
NR_ServingCellConfigCommon_t
*
scc
=
mac
->
scc
;
/*
mac->if_module->phy_config_request(&mac->phy_config);
cfg->sch_config.physical_cell_id = *scc->physCellId;
cfg->sch_config.ssb_scg_position_in_burst = scc->ssb_PositionsInBurst->choice.mediumBitmap.buf[0];
...
...
@@ -127,6 +126,7 @@ void config_common_ue(NR_UE_MAC_INST_t *mac) {
for (int i=0;i<cfg->pusch_config.num_PUSCHTimeDomainResourceAllocations;i++) {
cfg->pusch_config.PUSCHTimeDomainResourceAllocation_k2[i]=*scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList->list.array[0]->k2;
}
*/
}
int
nr_rrc_mac_config_req_ue
(
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
56c6c3ee
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