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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
54c5bb1d
Commit
54c5bb1d
authored
Dec 02, 2021
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some bugfixing
parent
a6fd4707
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
45 deletions
+67
-45
openair1/PHY/NR_TRANSPORT/nr_prs.c
openair1/PHY/NR_TRANSPORT/nr_prs.c
+33
-32
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+2
-2
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+19
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+13
-11
No files found.
openair1/PHY/NR_TRANSPORT/nr_prs.c
View file @
54c5bb1d
...
...
@@ -10,10 +10,10 @@
extern
short
nr_qpsk_mod_table
[
8
];
int
nr_generate_prs
(
uint32_t
*
nr_gold_prs
,
int
nr_generate_prs
(
uint32_t
*
*
nr_gold_prs
,
int32_t
*
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
prs_data_t
*
prs_data
,
nfapi_nr_config_request_scf_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
...
...
@@ -33,41 +33,42 @@ int nr_generate_prs(uint32_t *nr_gold_prs,
uint8_t
REOffset
=
0
;
uint8_t
symbolStart
=
5
;
uint8_t
NumPRSSymbols
=
6
;
uint16_t
NumPRBs
=
106
;
// QPSK modulation
for
(
int
m
=
0
;
m
<
NR_MAX_PRS_LENGTH
;
m
++
)
{
idx
=
(((
nr_gold_prs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
3
);
mod_prs
[
m
<<
1
]
=
nr_qpsk_mod_table
[
idx
<<
1
];
mod_prs
[(
m
<<
1
)
+
1
]
=
nr_qpsk_mod_table
[(
idx
<<
1
)
+
1
];
#ifdef DEBUG_PRS
printf
(
"m %d idx %d gold seq %d b0-b1 %d-%d mod_prs %d %d
\n
"
,
m
,
idx
,
nr_gold_prs
[(
m
<<
1
)
>>
5
],
(((
nr_gold_prs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
),
(((
nr_gold_prs
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
),
mod_prs
[(
m
<<
1
)],
mod_prs
[(
m
<<
1
)
+
1
]);
#endif
}
// PRS resource mapping with combsize=k which means PRS symbols exist in every k-th subcarrier in frequency domain
// According to ts138.211 sec.7.4.1.7.2
for
(
int
l
=
symbolStart
;
l
<
symbolStart
+
NumPRSSymbols
;
l
++
)
{
int
symInd
=
l
-
5
;
if
(
combSize
==
2
)
{
k_prime
=
k_prime_table
[
0
][
symInd
];
}
else
if
(
combSize
==
4
){
k_prime
=
k_prime_table
[
1
][
symInd
];
}
else
if
(
combSize
==
6
){
k_prime
=
k_prime_table
[
2
][
symInd
];
}
else
if
(
combSize
==
12
){
k_prime
=
k_prime_table
[
3
][
symInd
];
}
for
(
int
m
=
0
;
m
<
NR_MAX_PRS_LENGTH
;
m
++
)
{
int
symInd
=
l
-
5
;
if
(
combSize
==
2
)
{
k_prime
=
k_prime_table
[
0
][
symInd
];
}
else
if
(
combSize
==
4
){
k_prime
=
k_prime_table
[
1
][
symInd
];
}
else
if
(
combSize
==
6
){
k_prime
=
k_prime_table
[
2
][
symInd
];
}
else
if
(
combSize
==
12
){
k_prime
=
k_prime_table
[
3
][
symInd
];
}
k
=
(
REOffset
+
k_prime
)
%
combSize
+
frame_parms
->
ssb_start_subcarrier
;
for
(
int
m
=
0
;
m
<
12
/
combSize
*
NumPRBs
;
m
++
)
{
#ifdef DEBUG_PRS_MAP
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
#endif
idx
=
nr_gold_prs
[
l
][
m
];
mod_prs
[
m
<<
1
]
=
nr_qpsk_mod_table
[
idx
<<
1
];
mod_prs
[(
m
<<
1
)
+
1
]
=
nr_qpsk_mod_table
[(
idx
<<
1
)
+
1
];
#ifdef DEBUG_PRS
printf
(
"m %d idx %d gold seq %d mod_prs %d %d
\n
"
,
m
,
idx
,
nr_gold_prs
[
l
][
m
],
mod_prs
[(
idx
<<
1
)],
mod_prs
[(
idx
<<
1
)
+
1
]);
#endif
...
...
@@ -79,11 +80,11 @@ int nr_generate_prs(uint32_t *nr_gold_prs,
((
int16_t
*
)
txdataF
)[(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
],
((
int16_t
*
)
txdataF
)[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]);
#endif
k
=
m
*
combSize
+
(
REOffset
+
k_prime
)
%
combSize
;
//if (k >= frame_parms->ofdm_symbol_size)
//k-=frame_parms->ofdm_symbol_size;
k
=
k
+
combSize
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
54c5bb1d
...
...
@@ -40,10 +40,10 @@
#define NR_PBCH_PDU_BITS 24
int
nr_generate_prs
(
uint32_t
*
nr_gold_prs
,
int
nr_generate_prs
(
uint32_t
*
*
nr_gold_prs
,
int32_t
*
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
prs_data_t
*
prs_data
,
nfapi_nr_config_request_scf_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
...
...
openair1/PHY/defs_gNB.h
View file @
54c5bb1d
...
...
@@ -949,4 +949,23 @@ typedef struct processingData_L1 {
PHY_VARS_gNB
*
gNB
;
}
processingData_L1_t
;
// structures prototype
typedef
struct
prs
{
int
PRSResourceSetPeriod
[
2
];
//[slot period, slot offset]
int
PRSResourceOffset
;
// array if more than one resource sets.slot offset (0...511) (default 0)
int
PRSResourceRepetition
;
// slot offset (1 (default), 2, 4, 6, 8, 16, 32)
int
PRSResourceTimeGap
;
// slot offset (1 (default), 2, 4, 6, 8, 16, 32)
int
NumRB
;
//number of RBs in freq domain a scalar =< 275 RB
int
NumPRSSymbols
;
//number of PRS symbols in time domain
int
SymbolStart
;
//starting OFDM symbol of PRS resource in time domain
int
RBOffset
;
//Starting PRB index of all PRS resources in a PRS resource set.
int
CombSize
;
//RE density of all PRS resources in a PRS resource set. i∈{2,4,6,12}
int
REOffset
;
//Starting RE offset in the first OFDM symbol of each PRS resource in a PRS resource set.
int
MutingPattern1
[
2
];
//Muting bit pattern option-1, specified as [] or a binary-valued vector of length 2, 4, 6, 8, 16, or 32.
int
MutingPattern2
[
2
];
int
MutingBitRepetition
;
int
NPRSID
;
}
prs_data_t
;
#endif
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
54c5bb1d
...
...
@@ -103,11 +103,12 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_
else
nr_generate_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
0
][
ssb_index
&
7
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
if
(
cfg
->
carrier_config
.
num_tx_ant
.
value
<=
4
)
nr_generate_prs
(
gNB
->
nr_gold_prs
[
n_hf
][
ssb_index
&
7
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
else
nr_generate_prs
(
gNB
->
nr_gold_prs
[
0
][
ssb_index
&
7
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
prs_data_t
prs_data
;
prs_data
.
PRSResourceSetPeriod
[
0
]
=
0
;
prs_data
.
PRSResourceSetPeriod
[
1
]
=
0
;
// tbc
nr_generate_prs
(
gNB
->
nr_gold_prs
[
slot
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
&
prs_data
,
cfg
,
fp
);
if
(
T_ACTIVE
(
T_GNB_PHY_MIB
))
{
...
...
@@ -147,7 +148,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
// defining inputs and initials for nr_generate_prs()
int
**
txdataF
=
gNB
->
common_vars
.
txdataF
;
uint8_t
ssb_index
,
n_hf
;
uint8_t
ssb_index
,
n_hf
;
ssb_index
=
ssb_pdu
.
ssb_pdu_rel15
.
SsbBlockIndex
;
LOG_D
(
PHY
,
"common_signal_procedures: frame %d, slot %d ssb index %d
\n
"
,
frame
,
slot
,
ssb_index
);
...
...
@@ -240,11 +241,12 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
//TODO: nr_generate_prs
// check if we have prs to transmit in this frame and slot
if
(
cfg
->
carrier_config
.
num_tx_ant
.
value
<=
4
)
nr_generate_prs
(
gNB
->
nr_gold_prs
[
n_hf
][
ssb_index
&
7
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
else
nr_generate_prs
(
gNB
->
nr_gold_prs
[
0
][
ssb_index
&
7
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
prs_data_t
prs_data
;
prs_data
.
PRSResourceSetPeriod
[
0
]
=
0
;
prs_data
.
PRSResourceSetPeriod
[
1
]
=
0
;
// tbc
nr_generate_prs
(
gNB
->
nr_gold_prs
[
slot
],
&
txdataF
[
0
][
txdataF_offset
],
AMP
,
&
prs_data
,
cfg
,
fp
);
if
(
do_meas
==
1
)
stop_meas
(
&
gNB
->
phy_proc_tx
);
...
...
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