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
promise
OpenXG-RAN
Commits
a8ea336c
Commit
a8ea336c
authored
Aug 21, 2020
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/improve_nr_modulation' into develop_integration_2020_w34
parents
34a2945a
579f9f96
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
311 additions
and
62 deletions
+311
-62
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-0
executables/nr-softmodem.c
executables/nr-softmodem.c
+0
-3
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+0
-1
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+1
-0
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+3
-0
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+120
-18
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
+87
-0
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
+55
-4
openair1/PHY/NR_REFSIG/nr_mod_table.h
openair1/PHY/NR_REFSIG/nr_mod_table.h
+12
-1
openair1/PHY/NR_REFSIG/nr_refsig.h
openair1/PHY/NR_REFSIG/nr_refsig.h
+2
-0
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+2
-2
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+7
-7
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+1
-1
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+0
-1
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+17
-17
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+0
-1
openair1/SIMULATION/NR_PHY/prachsim.c
openair1/SIMULATION/NR_PHY/prachsim.c
+0
-1
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+0
-1
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+0
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+0
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
a8ea336c
...
@@ -1547,6 +1547,7 @@ set(PHY_SRC_UE
...
@@ -1547,6 +1547,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/scrambling_luts.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/scrambling_luts.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gen_mod_table.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ptrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ptrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
...
@@ -1599,6 +1600,7 @@ set(PHY_SRC_UE
...
@@ -1599,6 +1600,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/dmrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ptrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/ptrs_nr.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold_ue.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold_ue.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gen_mod_table.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/filt16a_32.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
...
...
executables/nr-softmodem.c
View file @
a8ea336c
...
@@ -84,9 +84,6 @@ unsigned short config_frames[4] = {2,9,11,13};
...
@@ -84,9 +84,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "NB_IoT_interface.h"
#include "NB_IoT_interface.h"
#include "x2ap_eNB.h"
#include "x2ap_eNB.h"
short
nr_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
16384
,
16384
,
-
16384
,
-
16384
,
16384
,
16384
,
16384
,
-
16384
,
-
16384
,
16384
,
-
16384
,
-
16384
,
7327
,
7327
,
7327
,
21981
,
21981
,
7327
,
21981
,
21981
,
7327
,
-
7327
,
7327
,
-
21981
,
21981
,
-
7327
,
21981
,
-
21981
,
-
7327
,
7327
,
-
7327
,
21981
,
-
21981
,
7327
,
-
21981
,
21981
,
-
7327
,
-
7327
,
-
7327
,
-
21981
,
-
21981
,
-
7327
,
-
21981
,
-
21981
,
10726
,
10726
,
10726
,
3576
,
3576
,
10726
,
3576
,
3576
,
10726
,
17876
,
10726
,
25027
,
3576
,
17876
,
3576
,
25027
,
17876
,
10726
,
17876
,
3576
,
25027
,
10726
,
25027
,
3576
,
17876
,
17876
,
17876
,
25027
,
25027
,
17876
,
25027
,
25027
,
10726
,
-
10726
,
10726
,
-
3576
,
3576
,
-
10726
,
3576
,
-
3576
,
10726
,
-
17876
,
10726
,
-
25027
,
3576
,
-
17876
,
3576
,
-
25027
,
17876
,
-
10726
,
17876
,
-
3576
,
25027
,
-
10726
,
25027
,
-
3576
,
17876
,
-
17876
,
17876
,
-
25027
,
25027
,
-
17876
,
25027
,
-
25027
,
-
10726
,
10726
,
-
10726
,
3576
,
-
3576
,
10726
,
-
3576
,
3576
,
-
10726
,
17876
,
-
10726
,
25027
,
-
3576
,
17876
,
-
3576
,
25027
,
-
17876
,
10726
,
-
17876
,
3576
,
-
25027
,
10726
,
-
25027
,
3576
,
-
17876
,
17876
,
-
17876
,
25027
,
-
25027
,
17876
,
-
25027
,
25027
,
-
10726
,
-
10726
,
-
10726
,
-
3576
,
-
3576
,
-
10726
,
-
3576
,
-
3576
,
-
10726
,
-
17876
,
-
10726
,
-
25027
,
-
3576
,
-
17876
,
-
3576
,
-
25027
,
-
17876
,
-
10726
,
-
17876
,
-
3576
,
-
25027
,
-
10726
,
-
25027
,
-
3576
,
-
17876
,
-
17876
,
-
17876
,
-
25027
,
-
25027
,
-
17876
,
-
25027
,
-
25027
,
8886
,
8886
,
8886
,
12439
,
12439
,
8886
,
12439
,
12439
,
8886
,
5332
,
8886
,
1778
,
12439
,
5332
,
12439
,
1778
,
5332
,
8886
,
5332
,
12439
,
1778
,
8886
,
1778
,
12439
,
5332
,
5332
,
5332
,
1778
,
1778
,
5332
,
1778
,
1778
,
8886
,
19547
,
8886
,
15993
,
12439
,
19547
,
12439
,
15993
,
8886
,
23101
,
8886
,
26655
,
12439
,
23101
,
12439
,
26655
,
5332
,
19547
,
5332
,
15993
,
1778
,
19547
,
1778
,
15993
,
5332
,
23101
,
5332
,
26655
,
1778
,
23101
,
1778
,
26655
,
19547
,
8886
,
19547
,
12439
,
15993
,
8886
,
15993
,
12439
,
19547
,
5332
,
19547
,
1778
,
15993
,
5332
,
15993
,
1778
,
23101
,
8886
,
23101
,
12439
,
26655
,
8886
,
26655
,
12439
,
23101
,
5332
,
23101
,
1778
,
26655
,
5332
,
26655
,
1778
,
19547
,
19547
,
19547
,
15993
,
15993
,
19547
,
15993
,
15993
,
19547
,
23101
,
19547
,
26655
,
15993
,
23101
,
15993
,
26655
,
23101
,
19547
,
23101
,
15993
,
26655
,
19547
,
26655
,
15993
,
23101
,
23101
,
23101
,
26655
,
26655
,
23101
,
26655
,
26655
,
8886
,
-
8886
,
8886
,
-
12439
,
12439
,
-
8886
,
12439
,
-
12439
,
8886
,
-
5332
,
8886
,
-
1778
,
12439
,
-
5332
,
12439
,
-
1778
,
5332
,
-
8886
,
5332
,
-
12439
,
1778
,
-
8886
,
1778
,
-
12439
,
5332
,
-
5332
,
5332
,
-
1778
,
1778
,
-
5332
,
1778
,
-
1778
,
8886
,
-
19547
,
8886
,
-
15993
,
12439
,
-
19547
,
12439
,
-
15993
,
8886
,
-
23101
,
8886
,
-
26655
,
12439
,
-
23101
,
12439
,
-
26655
,
5332
,
-
19547
,
5332
,
-
15993
,
1778
,
-
19547
,
1778
,
-
15993
,
5332
,
-
23101
,
5332
,
-
26655
,
1778
,
-
23101
,
1778
,
-
26655
,
19547
,
-
8886
,
19547
,
-
12439
,
15993
,
-
8886
,
15993
,
-
12439
,
19547
,
-
5332
,
19547
,
-
1778
,
15993
,
-
5332
,
15993
,
-
1778
,
23101
,
-
8886
,
23101
,
-
12439
,
26655
,
-
8886
,
26655
,
-
12439
,
23101
,
-
5332
,
23101
,
-
1778
,
26655
,
-
5332
,
26655
,
-
1778
,
19547
,
-
19547
,
19547
,
-
15993
,
15993
,
-
19547
,
15993
,
-
15993
,
19547
,
-
23101
,
19547
,
-
26655
,
15993
,
-
23101
,
15993
,
-
26655
,
23101
,
-
19547
,
23101
,
-
15993
,
26655
,
-
19547
,
26655
,
-
15993
,
23101
,
-
23101
,
23101
,
-
26655
,
26655
,
-
23101
,
26655
,
-
26655
,
-
8886
,
8886
,
-
8886
,
12439
,
-
12439
,
8886
,
-
12439
,
12439
,
-
8886
,
5332
,
-
8886
,
1778
,
-
12439
,
5332
,
-
12439
,
1778
,
-
5332
,
8886
,
-
5332
,
12439
,
-
1778
,
8886
,
-
1778
,
12439
,
-
5332
,
5332
,
-
5332
,
1778
,
-
1778
,
5332
,
-
1778
,
1778
,
-
8886
,
19547
,
-
8886
,
15993
,
-
12439
,
19547
,
-
12439
,
15993
,
-
8886
,
23101
,
-
8886
,
26655
,
-
12439
,
23101
,
-
12439
,
26655
,
-
5332
,
19547
,
-
5332
,
15993
,
-
1778
,
19547
,
-
1778
,
15993
,
-
5332
,
23101
,
-
5332
,
26655
,
-
1778
,
23101
,
-
1778
,
26655
,
-
19547
,
8886
,
-
19547
,
12439
,
-
15993
,
8886
,
-
15993
,
12439
,
-
19547
,
5332
,
-
19547
,
1778
,
-
15993
,
5332
,
-
15993
,
1778
,
-
23101
,
8886
,
-
23101
,
12439
,
-
26655
,
8886
,
-
26655
,
12439
,
-
23101
,
5332
,
-
23101
,
1778
,
-
26655
,
5332
,
-
26655
,
1778
,
-
19547
,
19547
,
-
19547
,
15993
,
-
15993
,
19547
,
-
15993
,
15993
,
-
19547
,
23101
,
-
19547
,
26655
,
-
15993
,
23101
,
-
15993
,
26655
,
-
23101
,
19547
,
-
23101
,
15993
,
-
26655
,
19547
,
-
26655
,
15993
,
-
23101
,
23101
,
-
23101
,
26655
,
-
26655
,
23101
,
-
26655
,
26655
,
-
8886
,
-
8886
,
-
8886
,
-
12439
,
-
12439
,
-
8886
,
-
12439
,
-
12439
,
-
8886
,
-
5332
,
-
8886
,
-
1778
,
-
12439
,
-
5332
,
-
12439
,
-
1778
,
-
5332
,
-
8886
,
-
5332
,
-
12439
,
-
1778
,
-
8886
,
-
1778
,
-
12439
,
-
5332
,
-
5332
,
-
5332
,
-
1778
,
-
1778
,
-
5332
,
-
1778
,
-
1778
,
-
8886
,
-
19547
,
-
8886
,
-
15993
,
-
12439
,
-
19547
,
-
12439
,
-
15993
,
-
8886
,
-
23101
,
-
8886
,
-
26655
,
-
12439
,
-
23101
,
-
12439
,
-
26655
,
-
5332
,
-
19547
,
-
5332
,
-
15993
,
-
1778
,
-
19547
,
-
1778
,
-
15993
,
-
5332
,
-
23101
,
-
5332
,
-
26655
,
-
1778
,
-
23101
,
-
1778
,
-
26655
,
-
19547
,
-
8886
,
-
19547
,
-
12439
,
-
15993
,
-
8886
,
-
15993
,
-
12439
,
-
19547
,
-
5332
,
-
19547
,
-
1778
,
-
15993
,
-
5332
,
-
15993
,
-
1778
,
-
23101
,
-
8886
,
-
23101
,
-
12439
,
-
26655
,
-
8886
,
-
26655
,
-
12439
,
-
23101
,
-
5332
,
-
23101
,
-
1778
,
-
26655
,
-
5332
,
-
26655
,
-
1778
,
-
19547
,
-
19547
,
-
19547
,
-
15993
,
-
15993
,
-
19547
,
-
15993
,
-
15993
,
-
19547
,
-
23101
,
-
19547
,
-
26655
,
-
15993
,
-
23101
,
-
15993
,
-
26655
,
-
23101
,
-
19547
,
-
23101
,
-
15993
,
-
26655
,
-
19547
,
-
26655
,
-
15993
,
-
23101
,
-
23101
,
-
23101
,
-
26655
,
-
26655
,
-
23101
,
-
26655
,
-
26655
};
pthread_cond_t
nfapi_sync_cond
;
pthread_cond_t
nfapi_sync_cond
;
pthread_mutex_t
nfapi_sync_mutex
;
pthread_mutex_t
nfapi_sync_mutex
;
int
nfapi_sync_var
=-
1
;
//!< protected by mutex \ref nfapi_sync_mutex
int
nfapi_sync_var
=-
1
;
//!< protected by mutex \ref nfapi_sync_mutex
...
...
executables/nr-uesoftmodem.c
View file @
a8ea336c
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
#include "SCHED/sched_common_vars.h"
#include "SCHED/sched_common_vars.h"
#include "PHY/MODULATION/modulation_vars.h"
#include "PHY/MODULATION/modulation_vars.h"
//#include "../../SIMU/USER/init_lte.h"
//#include "../../SIMU/USER/init_lte.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "LAYER2/MAC/mac_vars.h"
#include "LAYER2/MAC/mac_vars.h"
#include "RRC/LTE/rrc_vars.h"
#include "RRC/LTE/rrc_vars.h"
...
...
openair1/PHY/INIT/nr_init.c
View file @
a8ea336c
...
@@ -132,6 +132,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
...
@@ -132,6 +132,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
}
}
}
}
nr_generate_modulation_table
();
nr_init_pdcch_dmrs
(
gNB
,
cfg
->
cell_config
.
phy_cell_id
.
value
);
nr_init_pdcch_dmrs
(
gNB
,
cfg
->
cell_config
.
phy_cell_id
.
value
);
nr_init_pbch_interleaver
(
gNB
->
nr_pbch_interleaver
);
nr_init_pbch_interleaver
(
gNB
->
nr_pbch_interleaver
);
//PDSCH DMRS init
//PDSCH DMRS init
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
a8ea336c
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
//uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
//uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
...
@@ -681,6 +682,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
...
@@ -681,6 +682,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
ue
->
bitrate
[
eNB_id
]
=
0
;
ue
->
bitrate
[
eNB_id
]
=
0
;
ue
->
total_received_bits
[
eNB_id
]
=
0
;
ue
->
total_received_bits
[
eNB_id
]
=
0
;
}
}
// init NR modulation lookup tables
nr_generate_modulation_table
();
/////////////////////////PUSCH init/////////////////////////
/////////////////////////PUSCH init/////////////////////////
///////////
///////////
...
...
openair1/PHY/MODULATION/nr_modulation.c
View file @
a8ea336c
...
@@ -20,36 +20,138 @@
...
@@ -20,36 +20,138 @@
*/
*/
#include "nr_modulation.h"
#include "nr_modulation.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
extern
short
nr_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
];
void
nr_modulation
(
uint32_t
*
in
,
void
nr_modulation
(
uint32_t
*
in
,
uint32_t
length
,
uint32_t
length
,
uint16_t
mod_order
,
uint16_t
mod_order
,
int16_t
*
out
)
int16_t
*
out
)
{
{
uint16_t
offset
;
uint16_t
mask
=
((
1
<<
mod_order
)
-
1
);
uint8_t
idx
,
b_idx
;
int32_t
*
nr_mod_table32
;
int32_t
*
out32
=
(
int32_t
*
)
out
;
offset
=
(
mod_order
==
2
)
?
NR_MOD_TABLE_QPSK_OFFSET
:
(
mod_order
==
4
)
?
NR_MOD_TABLE_QAM16_OFFSET
:
\
uint8_t
*
in_bytes
=
(
uint8_t
*
)
in
;
(
mod_order
==
6
)
?
NR_MOD_TABLE_QAM64_OFFSET
:
(
mod_order
==
8
)
?
NR_MOD_TABLE_QAM256_OFFSET
:
0
;
uint64_t
*
in64
=
(
uint64_t
*
)
in
;
int64_t
*
out64
=
(
int64_t
*
)
out
;
uint8_t
idx
;
uint32_t
i
,
j
;
uint32_t
bit_cnt
;
uint64_t
x
,
x1
,
x2
;
#if defined(__SSE2__)
__m128i
*
nr_mod_table128
;
__m128i
*
out128
;
#endif
LOG_D
(
PHY
,
"nr_modulation: length %d, mod_order %d
\n
"
,
length
,
mod_order
);
LOG_D
(
PHY
,
"nr_modulation: length %d, mod_order %d
\n
"
,
length
,
mod_order
);
for
(
int
i
=
0
;
i
<
length
/
mod_order
;
i
++
)
switch
(
mod_order
)
{
{
idx
=
0
;
#if defined(__SSE2__)
for
(
int
j
=
0
;
j
<
mod_order
;
j
++
)
case
2
:
{
nr_mod_table128
=
(
__m128i
*
)
nr_qpsk_byte_mod_table
;
b_idx
=
(
i
*
mod_order
+
j
)
&
0x1f
;
out128
=
(
__m128i
*
)
out
;
if
(
i
&&
(
!
b_idx
))
for
(
i
=
0
;
i
<
length
/
8
;
i
++
)
in
++
;
out128
[
i
]
=
nr_mod_table128
[
in_bytes
[
i
]];
idx
^=
(((
*
in
)
>>
b_idx
)
&
1
)
<<
(
mod_order
-
j
-
1
);
// the bits that are left out
i
=
i
*
8
/
2
;
nr_mod_table32
=
(
int32_t
*
)
nr_qpsk_mod_table
;
while
(
i
<
length
/
2
){
idx
=
((
in_bytes
[(
i
*
2
)
/
8
]
>>
((
i
*
2
)
&
0x7
))
&
mask
);
out32
[
i
]
=
nr_mod_table32
[
idx
];
i
++
;
}
return
;
#else
case
2
:
nr_mod_table32
=
(
int32_t
*
)
nr_qpsk_mod_table
;
for
(
i
=
0
;
i
<
length
/
mod_order
;
i
++
)
{
idx
=
((
in
[
i
*
2
/
32
]
>>
((
i
*
2
)
&
0x1f
))
&
mask
);
out32
[
i
]
=
nr_mod_table32
[
idx
];
}
return
;
#endif
case
4
:
out64
=
(
int64_t
*
)
out
;
for
(
i
=
0
;
i
<
length
/
8
;
i
++
)
out64
[
i
]
=
nr_16qam_byte_mod_table
[
in_bytes
[
i
]];
// the bits that are left out
i
=
i
*
8
/
4
;
while
(
i
<
length
/
4
){
idx
=
((
in_bytes
[(
i
*
4
)
/
8
]
>>
((
i
*
4
)
&
0x7
))
&
mask
);
out32
[
i
]
=
nr_16qam_mod_table
[
idx
];
i
++
;
}
return
;
case
6
:
j
=
0
;
for
(
i
=
0
;
i
<
length
/
192
;
i
++
)
{
x
=
in64
[
i
*
3
];
x1
=
x
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
12
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
24
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
36
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
48
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x2
=
(
x
>>
60
);
x
=
in64
[
i
*
3
+
1
];
x2
|=
x
<<
4
;
x1
=
x2
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
12
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
24
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
36
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
48
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x2
=
((
x
>>
56
)
&
0xf0
)
|
(
x2
>>
60
);
x
=
in64
[
i
*
3
+
2
];
x2
|=
x
<<
8
;
x1
=
x2
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
12
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
24
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
36
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x2
>>
48
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x2
=
((
x
>>
52
)
&
0xff0
)
|
(
x2
>>
60
);
out64
[
j
++
]
=
nr_64qam_mod_table
[
x2
];
}
i
*=
24
;
bit_cnt
=
i
*
8
;
while
(
bit_cnt
<
length
)
{
x
=
*
((
uint32_t
*
)(
in_bytes
+
i
));
x1
=
x
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
x1
=
(
x
>>
12
)
&
4095
;
out64
[
j
++
]
=
nr_64qam_mod_table
[
x1
];
i
+=
3
;
bit_cnt
+=
24
;
}
}
return
;
case
8
:
nr_mod_table32
=
(
int32_t
*
)
nr_256qam_mod_table
;
for
(
i
=
0
;
i
<
length
/
8
;
i
++
)
out32
[
i
]
=
nr_mod_table32
[
in_bytes
[
i
]];
return
;
out
[
i
<<
1
]
=
nr_mod_table
[(
offset
+
idx
)
<<
1
];
default:
out
[(
i
<<
1
)
+
1
]
=
nr_mod_table
[((
offset
+
idx
)
<<
1
)
+
1
]
;
break
;
}
}
AssertFatal
(
false
,
"Invalid or unsupported modulation order %d
\n
"
,
mod_order
);
}
}
void
nr_layer_mapping
(
int16_t
**
mod_symbs
,
void
nr_layer_mapping
(
int16_t
**
mod_symbs
,
...
...
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
0 → 100644
View file @
a8ea336c
/*
* 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
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "nr_refsig.h"
#include "nr_mod_table.h"
void
nr_generate_modulation_table
()
{
float
sqrt2
=
0
.
70711
;
float
sqrt10
=
0
.
31623
;
float
sqrt42
=
0
.
15430
;
float
sqrt170
=
0
.
0766
96
;
float
val
=
32768
.
0
;
uint32_t
i
,
j
;
short
*
table
;
// QPSK
for
(
i
=
0
;
i
<
4
;
i
++
)
{
nr_qpsk_mod_table
[
i
*
2
]
=
(
short
)(
1
-
2
*
(
i
&
1
))
*
val
*
sqrt2
*
sqrt2
;
nr_qpsk_mod_table
[
i
*
2
+
1
]
=
(
short
)(
1
-
2
*
((
i
>>
1
)
&
1
))
*
val
*
sqrt2
*
sqrt2
;
//printf("%d j%d\n",nr_qpsk_mod_table[i*2],nr_qpsk_mod_table[i*2+1]);
}
#if defined(__SSE2__)
//QPSK m128
table
=
(
short
*
)
nr_qpsk_byte_mod_table
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
for
(
j
=
0
;
j
<
4
;
j
++
)
{
table
[
i
*
8
+
(
j
*
2
)]
=
(
short
)(
1
-
2
*
((
i
>>
(
j
*
2
))
&
1
))
*
val
*
sqrt2
*
sqrt2
;
table
[
i
*
8
+
(
j
*
2
)
+
1
]
=
(
short
)(
1
-
2
*
((
i
>>
(
j
*
2
+
1
))
&
1
))
*
val
*
sqrt2
*
sqrt2
;
//printf("%d j%d\n",nr_qpsk_byte_mod_table[i*8+(j*2)],nr_qpsk_byte_mod_table[i*8+(j*2)+1]);
}
}
#endif
//16QAM
table
=
(
short
*
)
nr_16qam_byte_mod_table
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
for
(
j
=
0
;
j
<
2
;
j
++
)
{
table
[
i
*
4
+
(
j
*
2
)]
=
(
short
)((
1
-
2
*
((
i
>>
(
j
*
4
))
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
(
j
*
4
+
2
))
&
1
))))
*
val
*
sqrt10
*
sqrt2
;
table
[
i
*
4
+
(
j
*
2
)
+
1
]
=
(
short
)((
1
-
2
*
((
i
>>
(
j
*
4
+
1
))
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
(
j
*
4
+
3
))
&
1
))))
*
val
*
sqrt10
*
sqrt2
;
//printf("%d j%d\n",nr_16qam_byte_mod_table[i*4+(j*2)],nr_16qam_byte_mod_table[i*4+(j*2)+1]);
}
}
table
=
(
short
*
)
nr_16qam_mod_table
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
table
[
i
*
2
]
=
(
short
)((
1
-
2
*
(
i
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
2
)
&
1
))))
*
val
*
sqrt10
*
sqrt2
;
table
[
i
*
2
+
1
]
=
(
short
)((
1
-
2
*
((
i
>>
1
)
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
3
)
&
1
))))
*
val
*
sqrt10
*
sqrt2
;
//printf("%d j%d\n",table[i*2],table[i*2+1]);
}
//64QAM
table
=
(
short
*
)
nr_64qam_mod_table
;
for
(
i
=
0
;
i
<
4096
;
i
++
)
{
for
(
j
=
0
;
j
<
2
;
j
++
)
{
table
[
i
*
4
+
(
j
*
2
)]
=
(
short
)((
1
-
2
*
((
i
>>
(
j
*
6
))
&
1
))
*
(
4
-
(
1
-
2
*
((
i
>>
(
j
*
6
+
2
))
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
(
j
*
6
+
4
))
&
1
)))))
*
val
*
sqrt42
*
sqrt2
;
table
[
i
*
4
+
(
j
*
2
)
+
1
]
=
(
short
)((
1
-
2
*
((
i
>>
(
j
*
6
+
1
))
&
1
))
*
(
4
-
(
1
-
2
*
((
i
>>
(
j
*
6
+
3
))
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
(
j
*
6
+
5
))
&
1
)))))
*
val
*
sqrt42
*
sqrt2
;
//printf("%d j%d\n",table[i*4+(j*2)],table[i*4+(j*2)+1]);
}
}
//256QAM
table
=
(
short
*
)
nr_256qam_mod_table
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
table
[
i
*
2
]
=
(
short
)((
1
-
2
*
(
i
&
1
))
*
(
8
-
(
1
-
2
*
((
i
>>
2
)
&
1
))
*
(
4
-
(
1
-
2
*
((
i
>>
4
)
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
6
)
&
1
))))))
*
val
*
sqrt170
*
sqrt2
;
table
[
i
*
2
+
1
]
=
(
short
)((
1
-
2
*
((
i
>>
1
)
&
1
))
*
(
8
-
(
1
-
2
*
((
i
>>
3
)
&
1
))
*
(
4
-
(
1
-
2
*
((
i
>>
5
)
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
7
)
&
1
))))))
*
val
*
sqrt170
*
sqrt2
;
}
}
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
View file @
a8ea336c
...
@@ -45,7 +45,7 @@ for r=0:1 %0 -- 1 LS
...
@@ -45,7 +45,7 @@ for r=0:1 %0 -- 1 LS
for
j
=
0
:
1
%0 -- 1 MS
for
j
=
0
:
1
%0 -- 1 MS
%% Formula is dispalayed
%% Formula is dispalayed
qpsk_table
(
2
*
r
+
j
+
1
)
=
((
1
-
r
*
2
)
*
QPSK
+
1
j
*
(
1
-
2
*
j
)
*
QPSK
);
qpsk_table
(
2
*
j
+
r
+
1
)
=
((
1
-
r
*
2
)
*
QPSK
+
1
j
*
(
1
-
2
*
j
)
*
QPSK
);
end
end
end
end
...
@@ -61,7 +61,7 @@ for b0=0:1
...
@@ -61,7 +61,7 @@ for b0=0:1
for
b1
=
0
:
1
for
b1
=
0
:
1
for
b2
=
0
:
1
for
b2
=
0
:
1
for
b3
=
0
:
1
for
b3
=
0
:
1
qam16_table2
(
b
0
*
8
+
b1
*
4
+
b2
*
2
+
b3
*
1
+
1
)
=
qam16_table
(
b0
*
2
+
b2
*
1
+
1
)
+
1
j
*
qam16_table
(
b1
*
2
+
b3
*
1
+
1
);
qam16_table2
(
b
3
*
8
+
b2
*
4
+
b1
*
2
+
b0
*
1
+
1
)
=
qam16_table
(
b0
*
2
+
b2
*
1
+
1
)
+
1
j
*
qam16_table
(
b1
*
2
+
b3
*
1
+
1
);
end
end
end
end
end
end
...
@@ -84,7 +84,7 @@ for b2=0:1
...
@@ -84,7 +84,7 @@ for b2=0:1
for
b3
=
0
:
1
for
b3
=
0
:
1
for
b4
=
0
:
1
for
b4
=
0
:
1
for
b5
=
0
:
1
for
b5
=
0
:
1
qam64_table2
(
b
0
*
32
+
b1
*
16
+
b2
*
8
+
b3
*
4
+
b4
*
2
+
b5
*
1
+
1
)
=
qam64_table
(
b0
*
4
+
b2
*
2
+
b4
*
1
+
1
)
+
1
j
*
qam64_table
(
b1
*
4
+
b3
*
2
+
b5
*
1
+
1
);
qam64_table2
(
b
5
*
32
+
b4
*
16
+
b3
*
8
+
b2
*
4
+
b1
*
2
+
b0
*
1
+
1
)
=
qam64_table
(
b0
*
4
+
b2
*
2
+
b4
*
1
+
1
)
+
1
j
*
qam64_table
(
b1
*
4
+
b3
*
2
+
b5
*
1
+
1
);
end
end
end
end
end
end
...
@@ -116,7 +116,50 @@ for b6=0:1
...
@@ -116,7 +116,50 @@ for b6=0:1
for
b7
=
0
:
1
for
b7
=
0
:
1
%%qam64_table2(b0*32+b1*16+b2*8+b3*4+b4*2+b5*1+1) = qam64_table(b0*4+b2*2+b4*1+1) + 1j*qam64_table(b1*4+b3*2+b5*1+1);
%%qam64_table2(b0*32+b1*16+b2*8+b3*4+b4*2+b5*1+1) = qam64_table(b0*4+b2*2+b4*1+1) + 1j*qam64_table(b1*4+b3*2+b5*1+1);
qam256_table2
(
b0
*
128
+
b1
*
64
+
b2
*
32
+
b3
*
16
+
b4
*
8
+
b5
*
4
+
b6
*
2
+
b7
*
1
+
1
)
=
qam256_table
(
b0
*
8
+
b2
*
4
+
b4
*
2
+
b6
*
1
+
1
)
+
1
j
*
qam256_table
(
b1
*
8
+
b3
*
4
+
b5
*
2
+
b7
*
1
+
1
);
qam256_table2
(
b7
*
128
+
b6
*
64
+
b5
*
32
+
b4
*
16
+
b3
*
8
+
b2
*
4
+
b1
*
2
+
b0
*
1
+
1
)
=
qam256_table
(
b0
*
8
+
b2
*
4
+
b4
*
2
+
b6
*
1
+
1
)
+
1
j
*
qam256_table
(
b1
*
8
+
b3
*
4
+
b5
*
2
+
b7
*
1
+
1
);
end
end
end
end
end
end
end
end
%%QPSK byte
for
b0
=
0
:
1
for
b1
=
0
:
1
for
b2
=
0
:
1
for
b3
=
0
:
1
for
b4
=
0
:
1
for
b5
=
0
:
1
for
b6
=
0
:
1
for
b7
=
0
:
1
qpsk_byte_table2
(
b7
*
128
+
b6
*
64
+
b5
*
32
+
b4
*
16
+
b3
*
8
+
b2
*
4
+
b1
*
2
+
b0
*
1
+
1
,:)
=
[(
1
-
b0
*
2
)
*
QPSK
(
1
-
2
*
b1
)
*
QPSK
(
1
-
b2
*
2
)
*
QPSK
(
1
-
2
*
b3
)
*
QPSK
...
(
1
-
b4
*
2
)
*
QPSK
(
1
-
2
*
b5
)
*
QPSK
(
1
-
b6
*
2
)
*
QPSK
(
1
-
2
*
b7
)
*
QPSK
];
end
end
end
end
end
end
end
end
%%16QAM byte
qam16_byte_table2
=
[];
for
b0
=
0
:
1
for
b1
=
0
:
1
for
b2
=
0
:
1
for
b3
=
0
:
1
for
b4
=
0
:
1
for
b5
=
0
:
1
for
b6
=
0
:
1
for
b7
=
0
:
1
qam16_byte_table2
(
b7
*
128
+
b6
*
64
+
b5
*
32
+
b4
*
16
+
b3
*
8
+
b2
*
4
+
b1
*
2
+
b0
*
1
+
1
,:)
=
[
qam16_table
(
b0
*
2
+
b2
*
1
+
1
)
qam16_table
(
b1
*
2
+
b3
*
1
+
1
)
...
qam16_table
(
b4
*
2
+
b6
*
1
+
1
)
qam16_table
(
b5
*
2
+
b7
*
1
+
1
)
];
end
end
end
end
end
end
...
@@ -133,6 +176,8 @@ save mod_table.mat table
...
@@ -133,6 +176,8 @@ save mod_table.mat table
table2
=
zeros
(
1
,
length
(
table
)
*
2
);
table2
=
zeros
(
1
,
length
(
table
)
*
2
);
table2
(
1
:
2
:
end
)
=
real
(
table
);
table2
(
1
:
2
:
end
)
=
real
(
table
);
table2
(
2
:
2
:
end
)
=
imag
(
table
);
table2
(
2
:
2
:
end
)
=
imag
(
table
);
qpsk_byte_table2
=
round
(
K
*
qpsk_byte_table2
'
(:));
qam16_byte_table2
=
round
(
K
*
qam16_byte_table2
'
(:));
fd
=
fopen
(
"nr_mod_table.h"
,
"w"
);
fd
=
fopen
(
"nr_mod_table.h"
,
"w"
);
fprintf
(
fd
,
"#define NR_MOD_TABLE_SIZE_SHORT %d\n"
,
length
(
table
)
*
2
);
fprintf
(
fd
,
"#define NR_MOD_TABLE_SIZE_SHORT %d\n"
,
length
(
table
)
*
2
);
...
@@ -144,4 +189,10 @@ fprintf(fd,"#define NR_MOD_TABLE_QAM256_OFFSET %d\n", 87);
...
@@ -144,4 +189,10 @@ fprintf(fd,"#define NR_MOD_TABLE_QAM256_OFFSET %d\n", 87);
fprintf
(
fd
,
"short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT] = {"
);
fprintf
(
fd
,
"short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT] = {"
);
fprintf
(
fd
,
"%d,"
,
table2
(
1
:
end
-
1
));
fprintf
(
fd
,
"%d,"
,
table2
(
1
:
end
-
1
));
fprintf
(
fd
,
"%d};\n"
,
table2
(
end
));
fprintf
(
fd
,
"%d};\n"
,
table2
(
end
));
fprintf
(
fd
,
"short nr_qpsk_mod_table[2048] = {"
);
fprintf
(
fd
,
"%d,"
,
qpsk_byte_table2
(
1
:
end
-
1
));
fprintf
(
fd
,
"%d};\n"
,
qpsk_byte_table2
(
end
));
fprintf
(
fd
,
"short nr_qam16_mod_table[1024] = {"
);
fprintf
(
fd
,
"%d,"
,
qam16_byte_table2
(
1
:
end
-
1
));
fprintf
(
fd
,
"%d};\n"
,
qam16_byte_table2
(
end
));
fclose
(
fd
);
fclose
(
fd
);
openair1/PHY/NR_REFSIG/nr_mod_table.h
View file @
a8ea336c
...
@@ -28,6 +28,17 @@
...
@@ -28,6 +28,17 @@
#define NR_MOD_TABLE_QAM16_OFFSET 7
#define NR_MOD_TABLE_QAM16_OFFSET 7
#define NR_MOD_TABLE_QAM64_OFFSET 23
#define NR_MOD_TABLE_QAM64_OFFSET 23
#define NR_MOD_TABLE_QAM256_OFFSET 87
#define NR_MOD_TABLE_QAM256_OFFSET 87
short
nr_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
16384
,
16384
,
-
16384
,
-
16384
,
16384
,
16384
,
16384
,
-
16384
,
-
16384
,
16384
,
-
16384
,
-
16384
,
7327
,
7327
,
7327
,
21981
,
21981
,
7327
,
21981
,
21981
,
7327
,
-
7327
,
7327
,
-
21981
,
21981
,
-
7327
,
21981
,
-
21981
,
-
7327
,
7327
,
-
7327
,
21981
,
-
21981
,
7327
,
-
21981
,
21981
,
-
7327
,
-
7327
,
-
7327
,
-
21981
,
-
21981
,
-
7327
,
-
21981
,
-
21981
,
10726
,
10726
,
10726
,
3576
,
3576
,
10726
,
3576
,
3576
,
10726
,
17876
,
10726
,
25027
,
3576
,
17876
,
3576
,
25027
,
17876
,
10726
,
17876
,
3576
,
25027
,
10726
,
25027
,
3576
,
17876
,
17876
,
17876
,
25027
,
25027
,
17876
,
25027
,
25027
,
10726
,
-
10726
,
10726
,
-
3576
,
3576
,
-
10726
,
3576
,
-
3576
,
10726
,
-
17876
,
10726
,
-
25027
,
3576
,
-
17876
,
3576
,
-
25027
,
17876
,
-
10726
,
17876
,
-
3576
,
25027
,
-
10726
,
25027
,
-
3576
,
17876
,
-
17876
,
17876
,
-
25027
,
25027
,
-
17876
,
25027
,
-
25027
,
-
10726
,
10726
,
-
10726
,
3576
,
-
3576
,
10726
,
-
3576
,
3576
,
-
10726
,
17876
,
-
10726
,
25027
,
-
3576
,
17876
,
-
3576
,
25027
,
-
17876
,
10726
,
-
17876
,
3576
,
-
25027
,
10726
,
-
25027
,
3576
,
-
17876
,
17876
,
-
17876
,
25027
,
-
25027
,
17876
,
-
25027
,
25027
,
-
10726
,
-
10726
,
-
10726
,
-
3576
,
-
3576
,
-
10726
,
-
3576
,
-
3576
,
-
10726
,
-
17876
,
-
10726
,
-
25027
,
-
3576
,
-
17876
,
-
3576
,
-
25027
,
-
17876
,
-
10726
,
-
17876
,
-
3576
,
-
25027
,
-
10726
,
-
25027
,
-
3576
,
-
17876
,
-
17876
,
-
17876
,
-
25027
,
-
25027
,
-
17876
,
-
25027
,
-
25027
,
8886
,
8886
,
8886
,
12439
,
12439
,
8886
,
12439
,
12439
,
8886
,
5332
,
8886
,
1778
,
12439
,
5332
,
12439
,
1778
,
5332
,
8886
,
5332
,
12439
,
1778
,
8886
,
1778
,
12439
,
5332
,
5332
,
5332
,
1778
,
1778
,
5332
,
1778
,
1778
,
8886
,
19547
,
8886
,
15993
,
12439
,
19547
,
12439
,
15993
,
8886
,
23101
,
8886
,
26655
,
12439
,
23101
,
12439
,
26655
,
5332
,
19547
,
5332
,
15993
,
1778
,
19547
,
1778
,
15993
,
5332
,
23101
,
5332
,
26655
,
1778
,
23101
,
1778
,
26655
,
19547
,
8886
,
19547
,
12439
,
15993
,
8886
,
15993
,
12439
,
19547
,
5332
,
19547
,
1778
,
15993
,
5332
,
15993
,
1778
,
23101
,
8886
,
23101
,
12439
,
26655
,
8886
,
26655
,
12439
,
23101
,
5332
,
23101
,
1778
,
26655
,
5332
,
26655
,
1778
,
19547
,
19547
,
19547
,
15993
,
15993
,
19547
,
15993
,
15993
,
19547
,
23101
,
19547
,
26655
,
15993
,
23101
,
15993
,
26655
,
23101
,
19547
,
23101
,
15993
,
26655
,
19547
,
26655
,
15993
,
23101
,
23101
,
23101
,
26655
,
26655
,
23101
,
26655
,
26655
,
8886
,
-
8886
,
8886
,
-
12439
,
12439
,
-
8886
,
12439
,
-
12439
,
8886
,
-
5332
,
8886
,
-
1778
,
12439
,
-
5332
,
12439
,
-
1778
,
5332
,
-
8886
,
5332
,
-
12439
,
1778
,
-
8886
,
1778
,
-
12439
,
5332
,
-
5332
,
5332
,
-
1778
,
1778
,
-
5332
,
1778
,
-
1778
,
8886
,
-
19547
,
8886
,
-
15993
,
12439
,
-
19547
,
12439
,
-
15993
,
8886
,
-
23101
,
8886
,
-
26655
,
12439
,
-
23101
,
12439
,
-
26655
,
5332
,
-
19547
,
5332
,
-
15993
,
1778
,
-
19547
,
1778
,
-
15993
,
5332
,
-
23101
,
5332
,
-
26655
,
1778
,
-
23101
,
1778
,
-
26655
,
19547
,
-
8886
,
19547
,
-
12439
,
15993
,
-
8886
,
15993
,
-
12439
,
19547
,
-
5332
,
19547
,
-
1778
,
15993
,
-
5332
,
15993
,
-
1778
,
23101
,
-
8886
,
23101
,
-
12439
,
26655
,
-
8886
,
26655
,
-
12439
,
23101
,
-
5332
,
23101
,
-
1778
,
26655
,
-
5332
,
26655
,
-
1778
,
19547
,
-
19547
,
19547
,
-
15993
,
15993
,
-
19547
,
15993
,
-
15993
,
19547
,
-
23101
,
19547
,
-
26655
,
15993
,
-
23101
,
15993
,
-
26655
,
23101
,
-
19547
,
23101
,
-
15993
,
26655
,
-
19547
,
26655
,
-
15993
,
23101
,
-
23101
,
23101
,
-
26655
,
26655
,
-
23101
,
26655
,
-
26655
,
-
8886
,
8886
,
-
8886
,
12439
,
-
12439
,
8886
,
-
12439
,
12439
,
-
8886
,
5332
,
-
8886
,
1778
,
-
12439
,
5332
,
-
12439
,
1778
,
-
5332
,
8886
,
-
5332
,
12439
,
-
1778
,
8886
,
-
1778
,
12439
,
-
5332
,
5332
,
-
5332
,
1778
,
-
1778
,
5332
,
-
1778
,
1778
,
-
8886
,
19547
,
-
8886
,
15993
,
-
12439
,
19547
,
-
12439
,
15993
,
-
8886
,
23101
,
-
8886
,
26655
,
-
12439
,
23101
,
-
12439
,
26655
,
-
5332
,
19547
,
-
5332
,
15993
,
-
1778
,
19547
,
-
1778
,
15993
,
-
5332
,
23101
,
-
5332
,
26655
,
-
1778
,
23101
,
-
1778
,
26655
,
-
19547
,
8886
,
-
19547
,
12439
,
-
15993
,
8886
,
-
15993
,
12439
,
-
19547
,
5332
,
-
19547
,
1778
,
-
15993
,
5332
,
-
15993
,
1778
,
-
23101
,
8886
,
-
23101
,
12439
,
-
26655
,
8886
,
-
26655
,
12439
,
-
23101
,
5332
,
-
23101
,
1778
,
-
26655
,
5332
,
-
26655
,
1778
,
-
19547
,
19547
,
-
19547
,
15993
,
-
15993
,
19547
,
-
15993
,
15993
,
-
19547
,
23101
,
-
19547
,
26655
,
-
15993
,
23101
,
-
15993
,
26655
,
-
23101
,
19547
,
-
23101
,
15993
,
-
26655
,
19547
,
-
26655
,
15993
,
-
23101
,
23101
,
-
23101
,
26655
,
-
26655
,
23101
,
-
26655
,
26655
,
-
8886
,
-
8886
,
-
8886
,
-
12439
,
-
12439
,
-
8886
,
-
12439
,
-
12439
,
-
8886
,
-
5332
,
-
8886
,
-
1778
,
-
12439
,
-
5332
,
-
12439
,
-
1778
,
-
5332
,
-
8886
,
-
5332
,
-
12439
,
-
1778
,
-
8886
,
-
1778
,
-
12439
,
-
5332
,
-
5332
,
-
5332
,
-
1778
,
-
1778
,
-
5332
,
-
1778
,
-
1778
,
-
8886
,
-
19547
,
-
8886
,
-
15993
,
-
12439
,
-
19547
,
-
12439
,
-
15993
,
-
8886
,
-
23101
,
-
8886
,
-
26655
,
-
12439
,
-
23101
,
-
12439
,
-
26655
,
-
5332
,
-
19547
,
-
5332
,
-
15993
,
-
1778
,
-
19547
,
-
1778
,
-
15993
,
-
5332
,
-
23101
,
-
5332
,
-
26655
,
-
1778
,
-
23101
,
-
1778
,
-
26655
,
-
19547
,
-
8886
,
-
19547
,
-
12439
,
-
15993
,
-
8886
,
-
15993
,
-
12439
,
-
19547
,
-
5332
,
-
19547
,
-
1778
,
-
15993
,
-
5332
,
-
15993
,
-
1778
,
-
23101
,
-
8886
,
-
23101
,
-
12439
,
-
26655
,
-
8886
,
-
26655
,
-
12439
,
-
23101
,
-
5332
,
-
23101
,
-
1778
,
-
26655
,
-
5332
,
-
26655
,
-
1778
,
-
19547
,
-
19547
,
-
19547
,
-
15993
,
-
15993
,
-
19547
,
-
15993
,
-
15993
,
-
19547
,
-
23101
,
-
19547
,
-
26655
,
-
15993
,
-
23101
,
-
15993
,
-
26655
,
-
23101
,
-
19547
,
-
23101
,
-
15993
,
-
26655
,
-
19547
,
-
26655
,
-
15993
,
-
23101
,
-
23101
,
-
23101
,
-
26655
,
-
26655
,
-
23101
,
-
26655
,
-
26655
};
short
nr_qpsk_mod_table
[
8
];
int32_t
nr_16qam_mod_table
[
16
];
#if defined(__SSE2__)
__m128i
nr_qpsk_byte_mod_table
[
2048
];
#endif
int64_t
nr_16qam_byte_mod_table
[
1024
];
int64_t
nr_64qam_mod_table
[
4096
];
int32_t
nr_256qam_mod_table
[
512
];
#endif
#endif
openair1/PHY/NR_REFSIG/nr_refsig.h
View file @
a8ea336c
...
@@ -53,6 +53,8 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
...
@@ -53,6 +53,8 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
void
init_scrambling_luts
(
void
);
void
init_scrambling_luts
(
void
);
void
nr_generate_modulation_table
(
void
);
extern
__m64
byte2m64_re
[
256
];
extern
__m64
byte2m64_re
[
256
];
extern
__m64
byte2m64_im
[
256
];
extern
__m64
byte2m64_im
[
256
];
...
...
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
a8ea336c
...
@@ -161,7 +161,7 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
...
@@ -161,7 +161,7 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
int16_t
amp
,
int16_t
amp
,
NR_DL_FRAME_PARMS
frame_parms
)
{
NR_DL_FRAME_PARMS
frame_parms
)
{
int16_t
mod_dmrs
[
NR_MAX_CSET_DURATION
][
NR_MAX_PDCCH_DMRS_LENGTH
>>
1
];
// 3 for the max coreset duration
int16_t
mod_dmrs
[
NR_MAX_CSET_DURATION
][
NR_MAX_PDCCH_DMRS_LENGTH
>>
1
]
__attribute__
((
aligned
(
16
)))
;
// 3 for the max coreset duration
uint16_t
cset_start_sc
;
uint16_t
cset_start_sc
;
uint8_t
cset_start_symb
,
cset_nsymb
;
uint8_t
cset_start_symb
,
cset_nsymb
;
int
k
,
l
,
k_prime
,
dci_idx
,
dmrs_idx
;
int
k
,
l
,
k_prime
,
dci_idx
,
dmrs_idx
;
...
@@ -260,7 +260,7 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
...
@@ -260,7 +260,7 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
scrambled_output
[
6
],
scrambled_output
[
7
],
scrambled_output
[
8
],
scrambled_output
[
9
],
scrambled_output
[
10
],
scrambled_output
[
11
]
);
scrambled_output
[
6
],
scrambled_output
[
7
],
scrambled_output
[
8
],
scrambled_output
[
9
],
scrambled_output
[
10
],
scrambled_output
[
11
]
);
#endif
#endif
/// QPSK modulation
/// QPSK modulation
int16_t
mod_dci
[
NR_MAX_DCI_SIZE
>>
1
];
int16_t
mod_dci
[
NR_MAX_DCI_SIZE
>>
1
]
__attribute__
((
aligned
(
16
)))
;
nr_modulation
(
scrambled_output
,
encoded_length
,
DMRS_MOD_ORDER
,
mod_dci
);
//Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
scrambled_output
,
encoded_length
,
DMRS_MOD_ORDER
,
mod_dci
);
//Qm = 2 as DMRS is QPSK modulated
#ifdef DEBUG_DCI
#ifdef DEBUG_DCI
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
a8ea336c
...
@@ -150,7 +150,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
...
@@ -150,7 +150,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
nb_re
=
((
12
*
rel15
->
NrOfSymbols
)
-
nb_re_dmrs
-
xOverhead
)
*
rel15
->
rbSize
*
rel15
->
NrOfCodewords
;
nb_re
=
((
12
*
rel15
->
NrOfSymbols
)
-
nb_re_dmrs
-
xOverhead
)
*
rel15
->
rbSize
*
rel15
->
NrOfCodewords
;
uint8_t
Qm
=
rel15
->
qamModOrder
[
0
];
uint8_t
Qm
=
rel15
->
qamModOrder
[
0
];
uint32_t
encoded_length
=
nb_re
*
Qm
;
uint32_t
encoded_length
=
nb_re
*
Qm
;
int16_t
mod_dmrs
[
n_dmrs
<<
1
];
int16_t
mod_dmrs
[
n_dmrs
<<
1
]
__attribute__
((
aligned
(
16
)))
;
/// CRC, coding, interleaving and rate matching
/// CRC, coding, interleaving and rate matching
AssertFatal
(
harq
->
pdu
!=
NULL
,
"harq->pdu is null
\n
"
);
AssertFatal
(
harq
->
pdu
!=
NULL
,
"harq->pdu is null
\n
"
);
...
...
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
a8ea336c
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
//#define DEBUG_PBCH_ENCODING
//#define DEBUG_PBCH_ENCODING
//#define DEBUG_PBCH_DMRS
//#define DEBUG_PBCH_DMRS
extern
short
nr_
mod_table
[
NR_MOD_TABLE_SIZE_SHORT
];
extern
short
nr_
qpsk_mod_table
[
8
];
uint8_t
nr_pbch_payload_interleaving_pattern
[
32
]
=
{
16
,
23
,
18
,
17
,
8
,
30
,
10
,
6
,
24
,
7
,
0
,
5
,
3
,
2
,
1
,
4
,
uint8_t
nr_pbch_payload_interleaving_pattern
[
32
]
=
{
16
,
23
,
18
,
17
,
8
,
30
,
10
,
6
,
24
,
7
,
0
,
5
,
3
,
2
,
1
,
4
,
9
,
11
,
12
,
13
,
14
,
15
,
19
,
20
,
21
,
22
,
25
,
26
,
27
,
28
,
29
,
31
9
,
11
,
12
,
13
,
14
,
15
,
19
,
20
,
21
,
22
,
25
,
26
,
27
,
28
,
29
,
31
...
@@ -61,9 +61,9 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
...
@@ -61,9 +61,9 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
/// QPSK modulation
/// QPSK modulation
for
(
int
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
for
(
int
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
idx
=
(((
(
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
)
<<
1
)
^
(((
gold_pbch_dmrs
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
);
idx
=
(((
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
3
);
mod_dmrs
[
m
<<
1
]
=
nr_
mod_table
[(
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
];
mod_dmrs
[
m
<<
1
]
=
nr_
qpsk_mod_table
[
idx
<<
1
];
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_
mod_table
[((
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
)
+
1
];
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_
qpsk_mod_table
[(
idx
<<
1
)
+
1
];
#ifdef DEBUG_PBCH_DMRS
#ifdef DEBUG_PBCH_DMRS
printf
(
"m %d idx %d gold seq %d b0-b1 %d-%d mod_dmrs %d %d
\n
"
,
m
,
idx
,
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
],
(((
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
),
printf
(
"m %d idx %d gold seq %d b0-b1 %d-%d mod_dmrs %d %d
\n
"
,
m
,
idx
,
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
],
(((
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
),
(((
gold_pbch_dmrs
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
),
mod_dmrs
[(
m
<<
1
)],
mod_dmrs
[(
m
<<
1
)
+
1
]);
(((
gold_pbch_dmrs
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
),
mod_dmrs
[(
m
<<
1
)],
mod_dmrs
[(
m
<<
1
)
+
1
]);
...
@@ -323,9 +323,9 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -323,9 +323,9 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
/// QPSK modulation
/// QPSK modulation
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E
>>
1
;
i
++
)
{
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E
>>
1
;
i
++
)
{
idx
=
((
(
pbch
->
pbch_e
[(
i
<<
1
)
>>
5
]
>>
((
i
<<
1
)
&
0x1f
))
&
1
)
<<
1
)
^
((
pbch
->
pbch_e
[((
i
<<
1
)
+
1
)
>>
5
]
>>
(((
i
<<
1
)
+
1
)
&
0x1f
))
&
1
);
idx
=
((
pbch
->
pbch_e
[(
i
<<
1
)
>>
5
]
>>
((
i
<<
1
)
&
0x1f
))
&
3
);
mod_pbch_e
[
i
<<
1
]
=
nr_
mod_table
[(
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
];
mod_pbch_e
[
i
<<
1
]
=
nr_
qpsk_mod_table
[
idx
<<
1
];
mod_pbch_e
[(
i
<<
1
)
+
1
]
=
nr_
mod_table
[((
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
)
+
1
];
mod_pbch_e
[(
i
<<
1
)
+
1
]
=
nr_
qpsk_mod_table
[(
idx
<<
1
)
+
1
];
#ifdef DEBUG_PBCH
#ifdef DEBUG_PBCH
printf
(
"i %d idx %d mod_pbch %d %d
\n
"
,
i
,
idx
,
mod_pbch_e
[
2
*
i
],
mod_pbch_e
[
2
*
i
+
1
]);
printf
(
"i %d idx %d mod_pbch %d %d
\n
"
,
i
,
idx
,
mod_pbch_e
[
2
*
i
],
mod_pbch_e
[
2
*
i
+
1
]);
#endif
#endif
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
View file @
a8ea336c
...
@@ -177,7 +177,7 @@ typedef struct {
...
@@ -177,7 +177,7 @@ typedef struct {
/// Scrambled "b"-sequences (for definition see 36-211 V8.6 2009-03, p.14)
/// Scrambled "b"-sequences (for definition see 36-211 V8.6 2009-03, p.14)
uint8_t
b_tilde
[
MAX_NUM_NR_CHANNEL_BITS
];
uint8_t
b_tilde
[
MAX_NUM_NR_CHANNEL_BITS
];
/// Modulated "d"-sequences (for definition see 36-211 V8.6 2009-03, p.14)
/// Modulated "d"-sequences (for definition see 36-211 V8.6 2009-03, p.14)
uint32_t
d_mod
[
MAX_NUM_NR_RE
];
uint32_t
d_mod
[
MAX_NUM_NR_RE
]
__attribute__
((
aligned
(
16
)))
;
/// Transform-coded "y"-sequences (for definition see 38-211 V15.3.0 2018-09, subsection 6.3.1.4)
/// Transform-coded "y"-sequences (for definition see 38-211 V15.3.0 2018-09, subsection 6.3.1.4)
uint32_t
y
[
MAX_NUM_NR_RE
]
__attribute__
((
aligned
(
16
)));
uint32_t
y
[
MAX_NUM_NR_RE
]
__attribute__
((
aligned
(
16
)));
/*
/*
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
a8ea336c
...
@@ -218,7 +218,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -218,7 +218,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
///////////
///////////
pusch_dmrs
=
UE
->
nr_gold_pusch_dmrs
[
slot
];
pusch_dmrs
=
UE
->
nr_gold_pusch_dmrs
[
slot
];
n_dmrs
=
(
nb_rb
*
((
dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
);
n_dmrs
=
(
nb_rb
*
((
dmrs_type
==
pusch_dmrs_type1
)
?
6
:
4
)
*
number_dmrs_symbols
);
int16_t
mod_dmrs
[
n_dmrs
<<
1
];
int16_t
mod_dmrs
[
n_dmrs
<<
1
]
__attribute
((
aligned
(
16
)))
;
///////////
///////////
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
a8ea336c
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
a8ea336c
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
...
@@ -927,22 +926,6 @@ int main(int argc, char **argv)
...
@@ -927,22 +926,6 @@ int main(int argc, char **argv)
printf
(
"SNR %f : n_errors (negative CRC) = %d/%d, Avg round %.2f, Channel BER %e, Eff Rate %.4f bits/slot, Eff Throughput %.2f, TBS %d bits/slot
\n
"
,
SNR
,
n_errors
,
n_trials
,
roundStats
[
snrRun
],(
double
)
errors_scrambling
/
available_bits
/
n_trials
,
effRate
,
effRate
/
TBS
*
100
,
TBS
);
printf
(
"SNR %f : n_errors (negative CRC) = %d/%d, Avg round %.2f, Channel BER %e, Eff Rate %.4f bits/slot, Eff Throughput %.2f, TBS %d bits/slot
\n
"
,
SNR
,
n_errors
,
n_trials
,
roundStats
[
snrRun
],(
double
)
errors_scrambling
/
available_bits
/
n_trials
,
effRate
,
effRate
/
TBS
*
100
,
TBS
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
if
(
n_trials
==
1
)
{
LOG_M
(
"rxsig0.m"
,
"rxs0"
,
UE
->
common_vars
.
rxdata
[
0
],
frame_length_complex_samples
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
LOG_M
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
frame_length_complex_samples
,
1
,
1
);
LOG_M
(
"chestF0.m"
,
"chF0"
,
UE
->
pdsch_vars
[
0
][
0
]
->
dl_ch_estimates_ext
,
N_RB_DL
*
12
*
14
,
1
,
1
);
write_output
(
"rxF_comp.m"
,
"rxFc"
,
&
UE
->
pdsch_vars
[
0
][
0
]
->
rxdataF_comp0
[
0
][
0
],
N_RB_DL
*
12
*
14
,
1
,
1
);
break
;
}
//if ((float)n_errors/(float)n_trials <= target_error_rate) {
if
(
effRate
>=
(
eff_tp_check
*
TBS
))
{
printf
(
"PDSCH test OK
\n
"
);
break
;
}
if
(
print_perf
==
1
)
{
if
(
print_perf
==
1
)
{
printf
(
"
\n
gNB TX function statistics (per %d us slot, NPRB %d, mcs %d, TBS %d, Kr %d (Zc %d))
\n
"
,
printf
(
"
\n
gNB TX function statistics (per %d us slot, NPRB %d, mcs %d, TBS %d, Kr %d (Zc %d))
\n
"
,
1000
>>*
scc
->
ssbSubcarrierSpacing
,
dlsch_config
.
rbSize
,
dlsch_config
.
mcsIndex
[
0
],
1000
>>*
scc
->
ssbSubcarrierSpacing
,
dlsch_config
.
rbSize
,
dlsch_config
.
mcsIndex
[
0
],
...
@@ -993,6 +976,23 @@ int main(int argc, char **argv)
...
@@ -993,6 +976,23 @@ int main(int argc, char **argv)
printStatIndent2(&UE->dlsch_tc_intl2_stats,"intl2+HardDecode+CRC");
printStatIndent2(&UE->dlsch_tc_intl2_stats,"intl2+HardDecode+CRC");
*/
*/
}
}
if
(
n_trials
==
1
)
{
LOG_M
(
"rxsig0.m"
,
"rxs0"
,
UE
->
common_vars
.
rxdata
[
0
],
frame_length_complex_samples
,
1
,
1
);
if
(
UE
->
frame_parms
.
nb_antennas_rx
>
1
)
LOG_M
(
"rxsig1.m"
,
"rxs1"
,
UE
->
common_vars
.
rxdata
[
1
],
frame_length_complex_samples
,
1
,
1
);
LOG_M
(
"chestF0.m"
,
"chF0"
,
UE
->
pdsch_vars
[
0
][
0
]
->
dl_ch_estimates_ext
,
N_RB_DL
*
12
*
14
,
1
,
1
);
write_output
(
"rxF_comp.m"
,
"rxFc"
,
&
UE
->
pdsch_vars
[
0
][
0
]
->
rxdataF_comp0
[
0
][
0
],
N_RB_DL
*
12
*
14
,
1
,
1
);
break
;
}
//if ((float)n_errors/(float)n_trials <= target_error_rate) {
if
(
effRate
>=
(
eff_tp_check
*
TBS
))
{
printf
(
"PDSCH test OK
\n
"
);
break
;
}
snrRun
++
;
snrRun
++
;
}
// NSR
}
// NSR
...
...
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
a8ea336c
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/phy_init.h"
...
...
openair1/SIMULATION/NR_PHY/prachsim.c
View file @
a8ea336c
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include "SCHED_NR_UE/phy_frame_config_nr.h"
#include "SCHED_NR_UE/phy_frame_config_nr.h"
#include "PHY/phy_vars_nr_ue.h"
#include "PHY/phy_vars_nr_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/phy_init.h"
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
a8ea336c
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/phy_init.h"
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
a8ea336c
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
a8ea336c
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
...
...
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