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
56785bde
Commit
56785bde
authored
Apr 30, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PBCH DMRS TX
parent
f0c7c5ed
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
174 additions
and
28 deletions
+174
-28
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+3
-0
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+2
-1
openair1/PHY/NR_REFSIG/defs.h
openair1/PHY/NR_REFSIG/defs.h
+35
-0
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
+1
-4
openair1/PHY/NR_REFSIG/nr_gold.c
openair1/PHY/NR_REFSIG/nr_gold.c
+67
-0
openair1/PHY/NR_REFSIG/nr_mod_table.h
openair1/PHY/NR_REFSIG/nr_mod_table.h
+1
-22
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+50
-1
openair1/PHY/defs.h
openair1/PHY/defs.h
+7
-0
openair1/SCHED_NR/defs.h
openair1/SCHED_NR/defs.h
+5
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+3
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
56785bde
...
...
@@ -1262,6 +1262,9 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/INIT/nr_parms.c
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/nr_pss.c
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/nr_sss.c
${
OPENAIR1_DIR
}
/PHY/NR_TRANSPORT/nr_pbch.c
${
OPENAIR1_DIR
}
/PHY/LTE_REFSIG/lte_gold.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_gold.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/file_output.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cadd_vv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/lte_dfts.c
...
...
openair1/PHY/INIT/nr_init.c
View file @
56785bde
...
...
@@ -112,6 +112,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
);*/
LOG_D
(
PHY
,
"[MSC_NEW][FRAME 00000][PHY_gNB][MOD %02"
PRIu8
"][]
\n
"
,
gNB
->
Mod_id
);
nr_init_pbch_dmrs
(
gNB
);
/*
lte_gold(fp,gNB->lte_gold_table,fp->Nid_cell);
generate_pcfich_reg_mapping(fp);
...
...
openair1/PHY/NR_REFSIG/defs.h
0 → 100644
View file @
56785bde
/*
* 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
*/
/* Definitions for LTE Reference signals */
/* Author R. Knopp / EURECOM / OpenAirInterface.org */
#ifndef __NR_REFSIG_DEFS__H__
#define __NR_REFSIG_DEFS__H__
#include "PHY/defs.h"
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PBCH DMRS.
@param PHY_VARS_gNB* gNB structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
*/
void
nr_init_pbch_dmrs
(
PHY_VARS_gNB
*
gNB
);
#endif
openair1/PHY/NR_REFSIG/nr_gen_mod_table.m
View file @
56785bde
...
...
@@ -3,9 +3,6 @@
% 0 .. "0"
% 1,2 .. BPSK(0),BPSK(1)
% 2^15 /sqrt(2) K = 768;
K
=
768
*
sqrt
(
2
)/
2
^
15
;
% Amplitude for BPSK (\f$ 2^15 \times 1/\sqrt{2}\f$)
BPSK
=
23170
;
...
...
@@ -14,7 +11,7 @@ for b = 0:1
bpsk_table
(
b
+
1
)
=
(
1
-
2
*
b
)
*
BPSK
+
1
j
*
(
1
-
2
*
b
)
*
BPSK
;
end
table
=
round
(
K
*
[
0
;
bpsk_table
(:)
])
;
table
=
[
0
;
bpsk_table
(:)
]
;
save
mod_table
.
mat
table
...
...
openair1/PHY/NR_REFSIG/nr_gold.c
0 → 100644
View file @
56785bde
/*
* 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 "defs.h"
void
nr_init_pbch_dmrs
(
PHY_VARS_gNB
*
gNB
)
{
unsigned
int
n
,
x1
,
x2
;
unsigned
char
Nid
,
i_ssb
,
i_ssb2
;
unsigned
char
Lmax
,
l
,
n_hf
,
N_hf
;
nfapi_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
Nid
=
cfg
->
sch_config
.
physical_cell_id
.
value
;
Lmax
=
(
fp
->
dl_CarrierFreq
<
3e9
)
?
4
:
8
;
N_hf
=
(
Lmax
==
4
)
?
2
:
1
;
for
(
n_hf
=
0
;
n_hf
<
N_hf
;
n_hf
++
)
{
for
(
l
=
0
;
l
<
Lmax
;
l
++
)
{
i_ssb
=
l
&
Lmax
;
i_ssb2
=
(
i_ssb
<<
2
)
+
n_hf
;
x1
=
1
+
(
1
<<
31
);
x2
=
(
1
<<
11
)
*
(
i_ssb2
+
1
)
*
((
Nid
>>
2
)
+
1
)
+
(
1
<<
6
)
*
(
i_ssb2
+
1
)
+
(
Nid
&
3
);
x2
=
x2
^
((
x2
^
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
))
<<
31
);
// skip first 50 double words (1600 bits)
for
(
n
=
1
;
n
<
50
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
}
for
(
n
=
0
;
n
<
NR_PBCH_DMRS_LENGTH_DWORD
;
n
++
)
{
x1
=
(
x1
>>
1
)
^
(
x1
>>
4
);
x1
=
x1
^
(
x1
<<
31
)
^
(
x1
<<
28
);
x2
=
(
x2
>>
1
)
^
(
x2
>>
2
)
^
(
x2
>>
3
)
^
(
x2
>>
4
);
x2
=
x2
^
(
x2
<<
31
)
^
(
x2
<<
30
)
^
(
x2
<<
29
)
^
(
x2
<<
28
);
gNB
->
nr_gold_pbch_dmrs
[
n_hf
][
l
][
n
]
=
x1
^
x2
;
}
}
}
}
openair1/PHY/NR_REFSIG/nr_mod_table.h
View file @
56785bde
/*
* 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
*/
#define MOD_TABLE_SIZE_SHORT 6
#define MOD_TABLE_BPSK_OFFSET 1
short
nr_mod_table
[
MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
768
,
768
,
-
768
,
-
768
};
short
nr_mod_table
[
MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
23170
,
-
23170
,
-
23170
};
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
56785bde
...
...
@@ -37,4 +37,53 @@
#include "PHY/extern.h"
#include "PHY/sse_intrin.h"
//#define DEBUG_PBCH 1
#define DEBUG_PBCH
short
nr_mod_table
[
MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
23170
,
-
23170
,
-
23170
};
int
nr_generate_pbch_dmrs
(
uint32_t
*
gold_pbch_dmrs
,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
m
,
k
,
l
;
int
a
,
aa
;
uint16_t
mod_dmrs
[
2
*
NR_PBCH_DMRS_LENGTH
];
/// BPSK modulation
for
(
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
mod_dmrs
[
2
*
m
]
=
nr_mod_table
[
2
*
(
1
+
(
*
(
gold_pbch_dmrs
+
m
/
32
))
&
(
1
<<
(
m
&
0xf
))
)];
mod_dmrs
[
2
*
m
+
1
]
=
nr_mod_table
[
2
*
(
1
+
(
*
(
gold_pbch_dmrs
+
m
/
32
))
&
(
1
<<
(
m
&
0xf
))
)
+
1
];
#ifdef DEBUG_PBCH
printf
(
"m %d mod_dmrs %d %d"
,
m
,
mod_dmrs
[
2
*
m
],
mod_dmrs
[
2
*
m
+
1
]);
#endif
}
/// Resource mapping
a
=
(
config
->
rf_config
.
tx_antenna_ports
.
value
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
// PBCH DMRS are mapped
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
56
;
//and
l
=
ssb_start_symbol
+
1
;
for
(
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
mod_dmrs
[
2
*
m
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
+
1
]
=
(
a
*
mod_dmrs
[
2
*
m
+
1
])
>>
15
;
#ifdef DEBUG_PBCH
int
idx
=
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
);
printf
(
"aa %d m %d txdataF %d %d %d"
,
aa
,
m
,
txdataF
[
aa
][
idx
],
txdataF
[
aa
][
idx
+
1
]);
#endif
k
++
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
return
(
0
);
}
openair1/PHY/defs.h
View file @
56785bde
...
...
@@ -134,6 +134,7 @@ static inline void* malloc16_clear( size_t size )
#include "PHY/CODING/defs.h"
#include "PHY/TOOLS/defs.h"
#include "platform_types.h"
#define MAX_NUM_RU_PER_eNB 64
#include "PHY/LTE_TRANSPORT/defs.h"
...
...
@@ -169,6 +170,9 @@ static inline void* malloc16_clear( size_t size )
#define nr_subframe_t lte_subframe_t
#define NR_PBCH_DMRS_LENGTH 144
#define NR_PBCH_DMRS_LENGTH_DWORD 5 // roundup(NR_PBCH_DMRS_LENGTH/32)
typedef
enum
{
nr_ssb_type_A
=
0
,
nr_ssb_type_B
,
...
...
@@ -1989,6 +1993,9 @@ typedef struct PHY_VARS_gNB_s {
int16_t
d_pss
[
NR_PSS_LENGTH
];
int16_t
d_sss
[
NR_SSS_LENGTH
];
/// PBCH DMRS sequence
uint32_t
nr_gold_pbch_dmrs
[
2
][
64
][
NR_PBCH_DMRS_LENGTH_DWORD
];
/// Indicator set to 0 after first SR
uint8_t
first_sr
[
NUMBER_OF_UE_MAX
];
...
...
openair1/SCHED_NR/defs.h
View file @
56785bde
...
...
@@ -45,6 +45,11 @@ int nr_generate_sss( int16_t *d_sss,
uint8_t
ssb_start_symbol
,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
int
nr_generate_pbch_dmrs
(
uint32_t
gold_sequence
,
int32_t
**
txdataF
,
int16_t
amp
,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
void
nr_set_ssb_first_subcarrier
(
nfapi_config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
);
#endif
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
56785bde
...
...
@@ -126,11 +126,14 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
int
ssb_start_symbol
=
nr_get_ssb_start_symbol
(
cfg
,
fp
);
nr_set_ssb_first_subcarrier
(
cfg
,
fp
);
if
(
subframe
==
ss_subframe
)
{
// Current implementation is based on SSB in first half frame, first candidate
LOG_I
(
PHY
,
"SS TX: frame %d, subframe %d, start_symbol %d
\n
"
,
frame
,
subframe
,
ssb_start_symbol
);
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_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
0
][
0
],
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
cfg
,
fp
);
}
}
...
...
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