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
Michael Black
OpenXG-RAN
Commits
382348ad
Commit
382348ad
authored
May 17, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PBCH generation layout
parent
5b970ac4
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
65 additions
and
28 deletions
+65
-28
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
+14
-4
openair1/PHY/NR_REFSIG/nr_mod_table.h
openair1/PHY/NR_REFSIG/nr_mod_table.h
+4
-3
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+26
-5
openair1/PHY/NR_TRANSPORT/nr_pss.c
openair1/PHY/NR_TRANSPORT/nr_pss.c
+0
-2
openair1/PHY/NR_TRANSPORT/nr_sss.c
openair1/PHY/NR_TRANSPORT/nr_sss.c
+0
-2
openair1/PHY/defs_RU.h
openair1/PHY/defs_RU.h
+1
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+14
-10
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+3
-2
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-0
targets/RT/USER/nr-softmodem.c
targets/RT/USER/nr-softmodem.c
+2
-0
No files found.
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
View file @
382348ad
...
@@ -6,12 +6,22 @@
...
@@ -6,12 +6,22 @@
% Amplitude for BPSK (\f$ 2^15 \times 1/\sqrt{2}\f$)
% Amplitude for BPSK (\f$ 2^15 \times 1/\sqrt{2}\f$)
BPSK
=
23170
;
BPSK
=
23170
;
% Amplitude for QPSK (\f$ 2^15 \times 1/\sqrt{2}\f$)
QPSK
=
23170
;
% BPSK
% BPSK
for
b
=
0
:
1
for
b
=
0
:
1
bpsk_table
(
b
+
1
)
=
(
1
-
2
*
b
)
*
BPSK
+
1
j
*
(
1
-
2
*
b
)
*
BPSK
;
bpsk_table
(
b
+
1
)
=
(
1
-
2
*
b
)
*
BPSK
+
1
j
*
(
1
-
2
*
b
)
*
BPSK
;
end
end
table
=
[
0
;
bpsk_table
(:)
];
%% QPSK
for
r
=
0
:
1
%0 -- 1 LS
for
j
=
0
:
1
%0 -- 1 MS
qpsk_table
(
2
*
r
+
j
+
1
)
=
((
1
-
r
*
2
)
*
QPSK
+
1
j
*
(
1
-
2
*
j
)
*
QPSK
);
end
end
table
=
[
0
;
bpsk_table
(:);
qpsk_table
(:)
];
save
mod_table
.
mat
table
save
mod_table
.
mat
table
...
@@ -20,10 +30,10 @@ table2(1:2:end) = real(table);
...
@@ -20,10 +30,10 @@ table2(1:2:end) = real(table);
table2
(
2
:
2
:
end
)
=
imag
(
table
);
table2
(
2
:
2
:
end
)
=
imag
(
table
);
fd
=
fopen
(
"nr_mod_table.h"
,
"w"
);
fd
=
fopen
(
"nr_mod_table.h"
,
"w"
);
fprintf
(
fd
,
"#define MOD_TABLE_SIZE_SHORT %d\n"
,
length
(
table
)
*
2
);
fprintf
(
fd
,
"#define NR_MOD_TABLE_SIZE_SHORT %d\n"
,
length
(
table
)
*
2
);
fprintf
(
fd
,
"#define MOD_TABLE_BPSK_OFFSET %d\n"
,
1
);
fprintf
(
fd
,
"#define NR_MOD_TABLE_BPSK_OFFSET %d\n"
,
1
);
fprintf
(
fd
,
"#define NR_MOD_TABLE_QPSK_OFFSET %d\n"
,
3
);
fprintf
(
fd
,
"short nr_mod_table[MOD_TABLE_SIZE_SHORT] = {"
);
fprintf
(
fd
,
"short nr_mod_table[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
));
fclose
(
fd
);
fclose
(
fd
);
openair1/PHY/NR_REFSIG/nr_mod_table.h
View file @
382348ad
#define MOD_TABLE_SIZE_SHORT 6
#define NR_MOD_TABLE_SIZE_SHORT 14
#define MOD_TABLE_BPSK_OFFSET 1
#define NR_MOD_TABLE_BPSK_OFFSET 1
short
nr_mod_table
[
MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
23170
,
-
23170
,
-
23170
};
#define NR_MOD_TABLE_QPSK_OFFSET 3
short
nr_mod_table
[
MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
23170
,
-
23170
,
-
23170
,
23170
,
23170
,
23170
,
-
23170
,
-
23170
,
23170
,
-
23170
,
-
23170
};
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
382348ad
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
*/
*/
/*! \file PHY/NR_TRANSPORT/nr_pbch.c
/*! \file PHY/NR_TRANSPORT/nr_pbch.c
* \brief Top-level routines for generating
and decoding
the PBCH/BCH physical/transport channel V15.1 03/2018
* \brief Top-level routines for generating the PBCH/BCH physical/transport channel V15.1 03/2018
* \author Guy De Souza
* \author Guy De Souza
* \date 2018
* \date 2018
* \version 0.1
* \version 0.1
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
//#define DEBUG_PBCH
//#define DEBUG_PBCH
short
nr_mod_table
[
MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
23170
,
-
23170
,
-
23170
}
;
extern
short
*
nr_mod_table
;
int
nr_generate_pbch_dmrs
(
uint32_t
*
gold_pbch_dmrs
,
int
nr_generate_pbch_dmrs
(
uint32_t
*
gold_pbch_dmrs
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
...
@@ -53,8 +53,8 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
...
@@ -53,8 +53,8 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
/// BPSK modulation
/// BPSK modulation
for
(
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
for
(
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
mod_dmrs
[
m
<<
1
]
=
nr_mod_table
[((
1
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
0x1f
)))
<<
1
)];
mod_dmrs
[
m
<<
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_BPSK_OFFSET
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
0x1f
)))
<<
1
)];
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_mod_table
[((
1
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
0x1f
)))
<<
1
)
+
1
];
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_BPSK_OFFSET
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
0x1f
)))
<<
1
)
+
1
];
#ifdef DEBUG_PBCH
#ifdef DEBUG_PBCH
printf
(
"m %d mod_dmrs %d %d
\n
"
,
m
,
mod_dmrs
[
2
*
m
],
mod_dmrs
[
2
*
m
+
1
]);
printf
(
"m %d mod_dmrs %d %d
\n
"
,
m
,
mod_dmrs
[
2
*
m
],
mod_dmrs
[
2
*
m
+
1
]);
#endif
#endif
...
@@ -121,5 +121,26 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
...
@@ -121,5 +121,26 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
#ifdef DEBUG_PBCH
#ifdef DEBUG_PBCH
write_output
(
"txdataF.m"
,
"txdataF"
,
txdataF
[
0
],
frame_parms
->
samples_per_frame_wCP
>>
1
,
1
,
1
);
write_output
(
"txdataF.m"
,
"txdataF"
,
txdataF
[
0
],
frame_parms
->
samples_per_frame_wCP
>>
1
,
1
,
1
);
#endif
#endif
return
(
0
);
return
0
;
}
#define NR_PBCH_LENGTH 1000
int
nr_generate_pbch
(
NR_gNB_PBCH
*
pbch
,
uint8_t
*
pbch_pdu
,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
uint8_t
nu
,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
m
,
k
,
l
;
int
a
,
aa
;
int16_t
mod_payload
[
2
*
NR_PBCH_LENGTH
];
LOG_I
(
PHY
,
"PBCH generation started
\n
"
);
return
0
;
}
}
openair1/PHY/NR_TRANSPORT/nr_pss.c
View file @
382348ad
...
@@ -23,8 +23,6 @@
...
@@ -23,8 +23,6 @@
//#define NR_PSS_DEBUG
//#define NR_PSS_DEBUG
//short nr_mod_table[MOD_TABLE_SIZE_SHORT] = {0,0,768,768,-768,-768};
int
nr_generate_pss
(
int16_t
*
d_pss
,
int
nr_generate_pss
(
int16_t
*
d_pss
,
int32_t
**
txdataF
,
int32_t
**
txdataF
,
int16_t
amp
,
int16_t
amp
,
...
...
openair1/PHY/NR_TRANSPORT/nr_sss.c
View file @
382348ad
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
extern
short
nr_mod_table
[
MOD_TABLE_SIZE_SHORT
];
//#define NR_SSS_DEBUG
//#define NR_SSS_DEBUG
int
nr_generate_sss
(
int16_t
*
d_sss
,
int
nr_generate_sss
(
int16_t
*
d_sss
,
...
...
openair1/PHY/defs_RU.h
View file @
382348ad
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#define MAX_BANDS_PER_RRU 4
#define MAX_BANDS_PER_RRU 4
#define MAX_NUM_RU_PER_gNB MAX_NUM_RU_PER_eNB
#ifdef OCP_FRAMEWORK
#ifdef OCP_FRAMEWORK
...
...
openair1/PHY/defs_gNB.h
View file @
382348ad
...
@@ -36,6 +36,10 @@
...
@@ -36,6 +36,10 @@
#include "defs_nr_common.h"
#include "defs_nr_common.h"
typedef
struct
{
uint8_t
pbch_d
[
100
];
}
NR_gNB_PBCH
;
typedef
struct
{
typedef
struct
{
/// \brief Pointers (dynamic) to the received data in the time domain.
/// \brief Pointers (dynamic) to the received data in the time domain.
/// - first index: rx antenna [0..nb_antennas_rx[
/// - first index: rx antenna [0..nb_antennas_rx[
...
@@ -169,9 +173,9 @@ typedef struct gNB_proc_t_s {
...
@@ -169,9 +173,9 @@ typedef struct gNB_proc_t_s {
typedef
struct
{
typedef
struct
{
// common measurements
// common measurements
//! estimated noise power (linear)
//! estimated noise power (linear)
unsigned
int
n0_power
[
MAX_NUM_RU_PER_
e
NB
];
unsigned
int
n0_power
[
MAX_NUM_RU_PER_
g
NB
];
//! estimated noise power (dB)
//! estimated noise power (dB)
unsigned
short
n0_power_dB
[
MAX_NUM_RU_PER_
e
NB
];
unsigned
short
n0_power_dB
[
MAX_NUM_RU_PER_
g
NB
];
//! total estimated noise power (linear)
//! total estimated noise power (linear)
unsigned
int
n0_power_tot
;
unsigned
int
n0_power_tot
;
//! estimated avg noise power (dB)
//! estimated avg noise power (dB)
...
@@ -179,9 +183,9 @@ typedef struct {
...
@@ -179,9 +183,9 @@ typedef struct {
//! estimated avg noise power (dB)
//! estimated avg noise power (dB)
short
n0_power_tot_dBm
;
short
n0_power_tot_dBm
;
//! estimated avg noise power per RB per RX ant (lin)
//! estimated avg noise power per RB per RX ant (lin)
unsigned
short
n0_subband_power
[
MAX_NUM_RU_PER_
e
NB
][
100
];
unsigned
short
n0_subband_power
[
MAX_NUM_RU_PER_
g
NB
][
100
];
//! estimated avg noise power per RB per RX ant (dB)
//! estimated avg noise power per RB per RX ant (dB)
unsigned
short
n0_subband_power_dB
[
MAX_NUM_RU_PER_
e
NB
][
100
];
unsigned
short
n0_subband_power_dB
[
MAX_NUM_RU_PER_
g
NB
][
100
];
//! estimated avg noise power per RB (dB)
//! estimated avg noise power per RB (dB)
short
n0_subband_power_tot_dB
[
100
];
short
n0_subband_power_tot_dB
[
100
];
//! estimated avg noise power per RB (dBm)
//! estimated avg noise power per RB (dBm)
...
@@ -199,17 +203,17 @@ typedef struct {
...
@@ -199,17 +203,17 @@ typedef struct {
int
rx_correlation_dB
[
NUMBER_OF_UE_MAX
][
2
];
int
rx_correlation_dB
[
NUMBER_OF_UE_MAX
][
2
];
/// Wideband CQI (= SINR)
/// Wideband CQI (= SINR)
int
wideband_cqi
[
NUMBER_OF_UE_MAX
][
MAX_NUM_RU_PER_
e
NB
];
int
wideband_cqi
[
NUMBER_OF_UE_MAX
][
MAX_NUM_RU_PER_
g
NB
];
/// Wideband CQI in dB (= SINR dB)
/// Wideband CQI in dB (= SINR dB)
int
wideband_cqi_dB
[
NUMBER_OF_UE_MAX
][
MAX_NUM_RU_PER_
e
NB
];
int
wideband_cqi_dB
[
NUMBER_OF_UE_MAX
][
MAX_NUM_RU_PER_
g
NB
];
/// Wideband CQI (sum of all RX antennas, in dB)
/// Wideband CQI (sum of all RX antennas, in dB)
char
wideband_cqi_tot
[
NUMBER_OF_UE_MAX
];
char
wideband_cqi_tot
[
NUMBER_OF_UE_MAX
];
/// Subband CQI per RX antenna and RB (= SINR)
/// Subband CQI per RX antenna and RB (= SINR)
int
subband_cqi
[
NUMBER_OF_UE_MAX
][
MAX_NUM_RU_PER_
e
NB
][
100
];
int
subband_cqi
[
NUMBER_OF_UE_MAX
][
MAX_NUM_RU_PER_
g
NB
][
100
];
/// Total Subband CQI and RB (= SINR)
/// Total Subband CQI and RB (= SINR)
int
subband_cqi_tot
[
NUMBER_OF_UE_MAX
][
100
];
int
subband_cqi_tot
[
NUMBER_OF_UE_MAX
][
100
];
/// Subband CQI in dB and RB (= SINR dB)
/// Subband CQI in dB and RB (= SINR dB)
int
subband_cqi_dB
[
NUMBER_OF_UE_MAX
][
MAX_NUM_RU_PER_
e
NB
][
100
];
int
subband_cqi_dB
[
NUMBER_OF_UE_MAX
][
MAX_NUM_RU_PER_
g
NB
][
100
];
/// Total Subband CQI and RB
/// Total Subband CQI and RB
int
subband_cqi_tot_dB
[
NUMBER_OF_UE_MAX
][
100
];
int
subband_cqi_tot_dB
[
NUMBER_OF_UE_MAX
][
100
];
/// PRACH background noise level
/// PRACH background noise level
...
@@ -226,7 +230,7 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -226,7 +230,7 @@ typedef struct PHY_VARS_gNB_s {
int
single_thread_flag
;
int
single_thread_flag
;
int
abstraction_flag
;
int
abstraction_flag
;
int
num_RU
;
int
num_RU
;
RU_t
*
RU_list
[
MAX_NUM_RU_PER_
e
NB
];
RU_t
*
RU_list
[
MAX_NUM_RU_PER_
g
NB
];
/// Ethernet parameters for northbound midhaul interface
/// Ethernet parameters for northbound midhaul interface
eth_params_t
eth_params_n
;
eth_params_t
eth_params_n
;
/// Ethernet parameters for fronthaul interface
/// Ethernet parameters for fronthaul interface
...
@@ -262,7 +266,7 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -262,7 +266,7 @@ typedef struct PHY_VARS_gNB_s {
NR_gNB_COMMON
common_vars
;
NR_gNB_COMMON
common_vars
;
LTE_eNB_UCI
uci_vars
[
NUMBER_OF_UE_MAX
];
LTE_eNB_UCI
uci_vars
[
NUMBER_OF_UE_MAX
];
LTE_eNB_SRS
srs_vars
[
NUMBER_OF_UE_MAX
];
LTE_eNB_SRS
srs_vars
[
NUMBER_OF_UE_MAX
];
LTE_e
NB_PBCH
pbch
;
NR_g
NB_PBCH
pbch
;
LTE_eNB_PUSCH
*
pusch_vars
[
NUMBER_OF_UE_MAX
];
LTE_eNB_PUSCH
*
pusch_vars
[
NUMBER_OF_UE_MAX
];
LTE_eNB_PRACH
prach_vars
;
LTE_eNB_PRACH
prach_vars
;
LTE_eNB_DLSCH_t
*
dlsch
[
NUMBER_OF_UE_MAX
][
2
];
// Nusers times two spatial streams
LTE_eNB_DLSCH_t
*
dlsch
[
NUMBER_OF_UE_MAX
][
2
];
// Nusers times two spatial streams
...
...
openair1/PHY/defs_nr_common.h
View file @
382348ad
...
@@ -51,8 +51,9 @@
...
@@ -51,8 +51,9 @@
#define ONE_OVER_SQRT2_Q15 23170
#define ONE_OVER_SQRT2_Q15 23170
#define ONE_OVER_TWO_Q15 16384
#define ONE_OVER_TWO_Q15 16384
#define MOD_TABLE_SIZE_SHORT 6
#define NR_MOD_TABLE_SIZE_SHORT 14
#define MOD_TABLE_BPSK_OFFSET 1
#define NR_MOD_TABLE_BPSK_OFFSET 1
#define NR_MOD_TABLE_QPSK_OFFSET 3
typedef
enum
{
typedef
enum
{
NR_MU_0
=
0
,
NR_MU_0
=
0
,
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
382348ad
...
@@ -138,6 +138,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
...
@@ -138,6 +138,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
nr_generate_pss
(
gNB
->
d_pss
,
txdataF
,
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_pss
(
gNB
->
d_pss
,
txdataF
,
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_sss
(
gNB
->
d_sss
,
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_sss
(
gNB
->
d_sss
,
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
n_hf
][
ssb_index
],
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
nu
,
cfg
,
fp
);
nr_generate_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
n_hf
][
ssb_index
],
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
nu
,
cfg
,
fp
);
nr_generate_pbch
(
&
gNB
->
pbch
,
pbch_pdu
,
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
nu
,
cfg
,
fp
);
}
}
}
}
...
...
targets/RT/USER/nr-softmodem.c
View file @
382348ad
...
@@ -94,6 +94,8 @@ unsigned short config_frames[4] = {2,9,11,13};
...
@@ -94,6 +94,8 @@ unsigned short config_frames[4] = {2,9,11,13};
// current status is that every UE has a DL scope for a SINGLE eNB (gnb_id=0)
// current status is that every UE has a DL scope for a SINGLE eNB (gnb_id=0)
// at eNB 0, an UL scope for every UE
// at eNB 0, an UL scope for every UE
short
nr_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
23170
,
-
23170
,
-
23170
,
23170
,
23170
,
23170
,
-
23170
,
-
23170
,
23170
,
-
23170
,
-
23170
};
FD_lte_phy_scope_ue
*
form_ue
[
NUMBER_OF_UE_MAX
];
FD_lte_phy_scope_ue
*
form_ue
[
NUMBER_OF_UE_MAX
];
FD_lte_phy_scope_enb
*
form_enb
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
FD_lte_phy_scope_enb
*
form_enb
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
FD_stats_form
*
form_stats
=
NULL
,
*
form_stats_l2
=
NULL
;
FD_stats_form
*
form_stats
=
NULL
,
*
form_stats_l2
=
NULL
;
...
...
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