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
zzha zzha
OpenXG-RAN
Commits
35324cfa
Commit
35324cfa
authored
Mar 02, 2022
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call nr_generate_csi_rs at UE side too
parent
6c27a40f
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
114 additions
and
82 deletions
+114
-82
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+16
-0
openair1/PHY/NR_REFSIG/nr_gold.c
openair1/PHY/NR_REFSIG/nr_gold.c
+0
-16
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
+2
-0
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
+79
-64
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+1
-1
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
+9
-0
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+2
-0
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+3
-0
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+1
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
35324cfa
...
...
@@ -353,6 +353,22 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
csirs_vars
[
gNB_id
]
->
active
=
false
;
srs_vars
[
gNB_id
]
->
active
=
false
;
ue
->
nr_csi_rs_info
=
(
nr_csi_rs_info_t
*
)
malloc16_clear
(
sizeof
(
nr_csi_rs_info_t
));
ue
->
nr_csi_rs_info
->
nr_gold_csi_rs
=
(
uint32_t
***
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
**
));
AssertFatal
(
ue
->
nr_csi_rs_info
->
nr_gold_csi_rs
!=
NULL
,
"NR init: csi reference signal malloc failed
\n
"
);
for
(
int
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
ue
->
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
]
=
(
uint32_t
**
)
malloc16
(
fp
->
symbols_per_slot
*
sizeof
(
uint32_t
*
));
AssertFatal
(
ue
->
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
]
!=
NULL
,
"NR init: csi reference signal for slot %d - malloc failed
\n
"
,
slot
);
for
(
int
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
ue
->
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
][
symb
]
=
(
uint32_t
*
)
malloc16
(
NR_MAX_CSI_RS_INIT_LENGTH_DWORD
*
sizeof
(
uint32_t
));
AssertFatal
(
ue
->
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
][
symb
]
!=
NULL
,
"NR init: csi reference signal for slot %d symbol %d - malloc failed
\n
"
,
slot
,
symb
);
}
}
ue
->
nr_csi_rs_info
->
csi_rs_received_signal
=
(
int32_t
**
)
malloc16
(
fp
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
ue
->
nr_csi_rs_info
->
csi_rs_received_signal
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
samples_per_frame_wCP
*
sizeof
(
int32_t
));
}
ue
->
nr_srs_info
=
(
nr_srs_info_t
*
)
malloc16_clear
(
sizeof
(
nr_srs_info_t
));
ue
->
nr_srs_info
->
srs_generated_signal
=
(
int32_t
*
)
malloc16_clear
(
(
2
*
(
fp
->
samples_per_frame
)
+
2048
)
*
sizeof
(
int32_t
)
);
ue
->
nr_srs_info
->
noise_power
=
(
uint32_t
*
)
malloc16_clear
(
sizeof
(
uint32_t
));
...
...
openair1/PHY/NR_REFSIG/nr_gold.c
View file @
35324cfa
...
...
@@ -130,19 +130,3 @@ void nr_gold_pusch(PHY_VARS_gNB* gNB, uint32_t *Nid) {
}
}
}
void
nr_init_csi_rs
(
NR_DL_FRAME_PARMS
*
fp
,
uint32_t
***
csi_rs
,
uint32_t
Nid
)
{
uint32_t
x1
,
x2
;
uint8_t
reset
;
for
(
uint8_t
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
uint8_t
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
reset
=
1
;
x2
=
((
1
<<
10
)
*
(
fp
->
symbols_per_slot
*
slot
+
symb
+
1
)
*
((
Nid
<<
1
)
+
1
)
+
(
Nid
));
for
(
uint32_t
n
=
0
;
n
<
NR_MAX_CSI_RS_INIT_LENGTH_DWORD
;
n
++
)
{
csi_rs
[
slot
][
symb
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
}
}
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
View file @
35324cfa
...
...
@@ -67,4 +67,6 @@ void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue,
uint16_t
*
N_n_scid
,
uint8_t
n_scid
);
void
nr_init_csi_rs
(
NR_DL_FRAME_PARMS
*
fp
,
uint32_t
***
csi_rs
,
uint32_t
Nid
);
#endif
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
View file @
35324cfa
...
...
@@ -27,37 +27,52 @@
//#define NR_CSIRS_DEBUG
void
nr_init_csi_rs
(
NR_DL_FRAME_PARMS
*
fp
,
uint32_t
***
csi_rs
,
uint32_t
Nid
)
{
uint32_t
x1
,
x2
;
uint8_t
reset
;
for
(
uint8_t
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
uint8_t
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
reset
=
1
;
x2
=
((
1
<<
10
)
*
(
fp
->
symbols_per_slot
*
slot
+
symb
+
1
)
*
((
Nid
<<
1
)
+
1
)
+
(
Nid
));
for
(
uint32_t
n
=
0
;
n
<
NR_MAX_CSI_RS_INIT_LENGTH_DWORD
;
n
++
)
{
csi_rs
[
slot
][
symb
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
}
}
void
nr_generate_csi_rs
(
NR_DL_FRAME_PARMS
frame_parms
,
int32_t
**
dataF
,
int16_t
amp
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
csi_params
,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
,
uint16_t
cell_id
,
int
slot
){
#ifdef NR_CSIRS_DEBUG
LOG_I
(
NR_PHY
,
"csi_params
.bwp_size = %i
\n
"
,
csi_params
.
bwp_size
);
LOG_I
(
NR_PHY
,
"csi_params
.bwp_start = %i
\n
"
,
csi_params
.
bwp_start
);
LOG_I
(
NR_PHY
,
"csi_params
.subcarrier_spacing = %i
\n
"
,
csi_params
.
subcarrier_spacing
);
LOG_I
(
NR_PHY
,
"csi_params
.cyclic_prefix = %i
\n
"
,
csi_params
.
cyclic_prefix
);
LOG_I
(
NR_PHY
,
"csi_params
.start_rb = %i
\n
"
,
csi_params
.
start_rb
);
LOG_I
(
NR_PHY
,
"csi_params
.nr_of_rbs = %i
\n
"
,
csi_params
.
nr_of_rbs
);
LOG_I
(
NR_PHY
,
"csi_params
.csi_type = %i (0:TRS, 1:CSI-RS NZP, 2:CSI-RS ZP)
\n
"
,
csi_params
.
csi_type
);
LOG_I
(
NR_PHY
,
"csi_params
.row = %i
\n
"
,
csi_params
.
row
);
LOG_I
(
NR_PHY
,
"csi_params
.freq_domain = %i
\n
"
,
csi_params
.
freq_domain
);
LOG_I
(
NR_PHY
,
"csi_params
.symb_l0 = %i
\n
"
,
csi_params
.
symb_l0
);
LOG_I
(
NR_PHY
,
"csi_params
.symb_l1 = %i
\n
"
,
csi_params
.
symb_l1
);
LOG_I
(
NR_PHY
,
"csi_params
.cdm_type = %i
\n
"
,
csi_params
.
cdm_type
);
LOG_I
(
NR_PHY
,
"csi_params
.freq_density = %i (0: dot5 (even RB), 1: dot5 (odd RB), 2: one, 3: three)
\n
"
,
csi_params
.
freq_density
);
LOG_I
(
NR_PHY
,
"csi_params
.scramb_id = %i
\n
"
,
csi_params
.
scramb_id
);
LOG_I
(
NR_PHY
,
"csi_params
.power_control_offset = %i
\n
"
,
csi_params
.
power_control_offset
);
LOG_I
(
NR_PHY
,
"csi_params
.power_control_offset_ss = %i
\n
"
,
csi_params
.
power_control_offset_ss
);
LOG_I
(
NR_PHY
,
"csi_params
->bwp_size = %i
\n
"
,
csi_params
->
bwp_size
);
LOG_I
(
NR_PHY
,
"csi_params
->bwp_start = %i
\n
"
,
csi_params
->
bwp_start
);
LOG_I
(
NR_PHY
,
"csi_params
->subcarrier_spacing = %i
\n
"
,
csi_params
->
subcarrier_spacing
);
LOG_I
(
NR_PHY
,
"csi_params
->cyclic_prefix = %i
\n
"
,
csi_params
->
cyclic_prefix
);
LOG_I
(
NR_PHY
,
"csi_params
->start_rb = %i
\n
"
,
csi_params
->
start_rb
);
LOG_I
(
NR_PHY
,
"csi_params
->nr_of_rbs = %i
\n
"
,
csi_params
->
nr_of_rbs
);
LOG_I
(
NR_PHY
,
"csi_params
->csi_type = %i (0:TRS, 1:CSI-RS NZP, 2:CSI-RS ZP)
\n
"
,
csi_params
->
csi_type
);
LOG_I
(
NR_PHY
,
"csi_params
->row = %i
\n
"
,
csi_params
->
row
);
LOG_I
(
NR_PHY
,
"csi_params
->freq_domain = %i
\n
"
,
csi_params
->
freq_domain
);
LOG_I
(
NR_PHY
,
"csi_params
->symb_l0 = %i
\n
"
,
csi_params
->
symb_l0
);
LOG_I
(
NR_PHY
,
"csi_params
->symb_l1 = %i
\n
"
,
csi_params
->
symb_l1
);
LOG_I
(
NR_PHY
,
"csi_params
->cdm_type = %i
\n
"
,
csi_params
->
cdm_type
);
LOG_I
(
NR_PHY
,
"csi_params
->freq_density = %i (0: dot5 (even RB), 1: dot5 (odd RB), 2: one, 3: three)
\n
"
,
csi_params
->
freq_density
);
LOG_I
(
NR_PHY
,
"csi_params
->scramb_id = %i
\n
"
,
csi_params
->
scramb_id
);
LOG_I
(
NR_PHY
,
"csi_params
->power_control_offset = %i
\n
"
,
csi_params
->
power_control_offset
);
LOG_I
(
NR_PHY
,
"csi_params
->power_control_offset_ss = %i
\n
"
,
csi_params
->
power_control_offset_ss
);
#endif
int
dataF_offset
=
slot
*
frame_parms
.
samples_per_slot_wCP
;
uint32_t
**
nr_gold_csi_rs
=
nr_csi_rs_info
->
nr_gold_csi_rs
[
slot
];
int16_t
mod_csi
[
frame_parms
.
symbols_per_slot
][
NR_MAX_CSI_RS_LENGTH
>>
1
]
__attribute__
((
aligned
(
16
)));;
uint16_t
b
=
csi_params
.
freq_domain
;
uint16_t
b
=
csi_params
->
freq_domain
;
uint16_t
n
,
csi_bw
,
csi_start
,
p
,
k
,
l
,
mprime
,
na
,
kpn
,
csi_length
;
uint8_t
size
,
ports
,
kprime
,
lprime
,
i
,
gs
;
uint8_t
j
[
16
],
k_n
[
6
],
koverline
[
16
],
loverline
[
16
];
...
...
@@ -71,10 +86,10 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
// pre-computed for scrambling id equel to cell id
// if the scrambling id is not the cell id we need to re-initialize the rs
if
(
csi_params
.
scramb_id
!=
cell_id
)
{
if
(
csi_params
->
scramb_id
!=
cell_id
)
{
uint8_t
reset
;
uint32_t
x1
,
x2
;
uint32_t
Nid
=
csi_params
.
scramb_id
;
uint32_t
Nid
=
csi_params
->
scramb_id
;
for
(
uint8_t
symb
=
0
;
symb
<
frame_parms
.
symbols_per_slot
;
symb
++
)
{
reset
=
1
;
x2
=
((
1
<<
10
)
*
(
frame_parms
.
symbols_per_slot
*
slot
+
symb
+
1
)
*
((
Nid
<<
1
)
+
1
)
+
(
Nid
));
...
...
@@ -85,7 +100,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
}
switch
(
csi_params
.
row
)
{
switch
(
csi_params
->
row
)
{
// implementation of table 7.4.1.5.3-1 of 38.211
// lprime and kprime are the max value of l' and k'
case
1
:
...
...
@@ -103,7 +118,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
0
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
0
]
+
(
i
<<
2
);
}
break
;
...
...
@@ -123,7 +138,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
0
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
0
];
}
break
;
...
...
@@ -143,7 +158,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
0
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
0
];
}
break
;
...
...
@@ -163,7 +178,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
0
]
+
(
i
<<
1
);
}
break
;
...
...
@@ -183,7 +198,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
+
i
;
loverline
[
i
]
=
csi_params
->
symb_l0
+
i
;
koverline
[
i
]
=
k_n
[
0
];
}
break
;
...
...
@@ -202,7 +217,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
...
...
@@ -221,7 +236,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
+
(
i
>>
1
);
loverline
[
i
]
=
csi_params
->
symb_l0
+
(
i
>>
1
);
koverline
[
i
]
=
k_n
[
i
%
2
];
}
break
;
...
...
@@ -240,7 +255,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
...
...
@@ -259,7 +274,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
...
...
@@ -278,7 +293,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
...
...
@@ -297,7 +312,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
+
(
i
>>
2
);
loverline
[
i
]
=
csi_params
->
symb_l0
+
(
i
>>
2
);
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
...
...
@@ -316,7 +331,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
...
...
@@ -336,9 +351,9 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
if
(
i
<
6
)
loverline
[
i
]
=
csi_params
.
symb_l0
+
i
/
3
;
loverline
[
i
]
=
csi_params
->
symb_l0
+
i
/
3
;
else
loverline
[
i
]
=
csi_params
.
symb_l1
+
i
/
9
;
loverline
[
i
]
=
csi_params
->
symb_l1
+
i
/
9
;
koverline
[
i
]
=
k_n
[
i
%
3
];
}
break
;
...
...
@@ -358,9 +373,9 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
if
(
i
<
3
)
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
else
loverline
[
i
]
=
csi_params
.
symb_l1
;
loverline
[
i
]
=
csi_params
->
symb_l1
;
koverline
[
i
]
=
k_n
[
i
%
3
];
}
break
;
...
...
@@ -379,7 +394,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
...
...
@@ -399,9 +414,9 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
if
(
i
<
8
)
loverline
[
i
]
=
csi_params
.
symb_l0
+
(
i
>>
2
);
loverline
[
i
]
=
csi_params
->
symb_l0
+
(
i
>>
2
);
else
loverline
[
i
]
=
csi_params
.
symb_l1
+
(
i
/
12
);
loverline
[
i
]
=
csi_params
->
symb_l1
+
(
i
/
12
);
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
...
...
@@ -421,9 +436,9 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
if
(
i
<
4
)
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
else
loverline
[
i
]
=
csi_params
.
symb_l1
;
loverline
[
i
]
=
csi_params
->
symb_l1
;
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
...
...
@@ -442,17 +457,17 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
loverline
[
i
]
=
csi_params
->
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
default:
AssertFatal
(
0
==
1
,
"Row %d is not valid for CSI Table 7.4.1.5.3-1
\n
"
,
csi_params
.
row
);
AssertFatal
(
0
==
1
,
"Row %d is not valid for CSI Table 7.4.1.5.3-1
\n
"
,
csi_params
->
row
);
}
#ifdef NR_CSIRS_DEBUG
printf
(
" row %d, n. of ports %d
\n
k' "
,
csi_params
.
row
,
ports
);
printf
(
" row %d, n. of ports %d
\n
k' "
,
csi_params
->
row
,
ports
);
for
(
kp
=
0
;
kp
<=
kprime
;
kp
++
)
printf
(
"%d, "
,
kp
);
printf
(
"l' "
);
...
...
@@ -469,7 +484,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
// setting the frequency density from its index
switch
(
csi_params
.
freq_density
)
{
switch
(
csi_params
->
freq_density
)
{
case
0
:
rho
=
0
.
5
;
...
...
@@ -501,7 +516,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
#endif
// CDM group size from CDM type index
switch
(
csi_params
.
cdm_type
)
{
switch
(
csi_params
->
cdm_type
)
{
case
0
:
gs
=
1
;
...
...
@@ -524,17 +539,17 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
// according to 38.214 5.2.2.3.1 last paragraph
if
(
csi_params
.
start_rb
<
csi_params
.
bwp_start
)
csi_start
=
csi_params
.
bwp_start
;
if
(
csi_params
->
start_rb
<
csi_params
->
bwp_start
)
csi_start
=
csi_params
->
bwp_start
;
else
csi_start
=
csi_params
.
start_rb
;
if
(
csi_params
.
nr_of_rbs
>
(
csi_params
.
bwp_start
+
csi_params
.
bwp_size
-
csi_start
))
csi_bw
=
csi_params
.
bwp_start
+
csi_params
.
bwp_size
-
csi_start
;
csi_start
=
csi_params
->
start_rb
;
if
(
csi_params
->
nr_of_rbs
>
(
csi_params
->
bwp_start
+
csi_params
->
bwp_size
-
csi_start
))
csi_bw
=
csi_params
->
bwp_start
+
csi_params
->
bwp_size
-
csi_start
;
else
csi_bw
=
csi_params
.
nr_of_rbs
;
csi_bw
=
csi_params
->
nr_of_rbs
;
if
(
rho
<
1
)
{
if
(
csi_params
.
freq_density
==
0
)
if
(
csi_params
->
freq_density
==
0
)
csi_length
=
(((
csi_bw
+
csi_start
)
>>
1
)
<<
kprime
)
<<
1
;
else
csi_length
=
((((
csi_bw
+
csi_start
)
>>
1
)
<<
kprime
)
+
1
)
<<
1
;
...
...
@@ -548,14 +563,14 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
// TRS
if
(
csi_params
.
csi_type
==
0
)
{
if
(
csi_params
->
csi_type
==
0
)
{
// ???
}
// NZP CSI RS
if
(
csi_params
.
csi_type
==
1
)
{
if
(
csi_params
->
csi_type
==
1
)
{
// assuming amp is the amplitude of SSB channels
switch
(
csi_params
.
power_control_offset_ss
)
{
switch
(
csi_params
->
power_control_offset_ss
)
{
case
0
:
beta
=
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
break
;
...
...
@@ -573,14 +588,14 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
}
for
(
lp
=
0
;
lp
<=
lprime
;
lp
++
){
symb
=
csi_params
.
symb_l0
;
symb
=
csi_params
->
symb_l0
;
nr_modulation
(
nr_gold_csi_rs
[
symb
+
lp
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
lp
]);
if
((
csi_params
.
row
==
5
)
||
(
csi_params
.
row
==
7
)
||
(
csi_params
.
row
==
11
)
||
(
csi_params
.
row
==
13
)
||
(
csi_params
.
row
==
16
))
if
((
csi_params
->
row
==
5
)
||
(
csi_params
->
row
==
7
)
||
(
csi_params
->
row
==
11
)
||
(
csi_params
->
row
==
13
)
||
(
csi_params
->
row
==
16
))
nr_modulation
(
nr_gold_csi_rs
[
symb
+
1
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
1
]);
if
((
csi_params
.
row
==
14
)
||
(
csi_params
.
row
==
13
)
||
(
csi_params
.
row
==
16
)
||
(
csi_params
.
row
==
17
))
{
symb
=
csi_params
.
symb_l1
;
if
((
csi_params
->
row
==
14
)
||
(
csi_params
->
row
==
13
)
||
(
csi_params
->
row
==
16
)
||
(
csi_params
->
row
==
17
))
{
symb
=
csi_params
->
symb_l1
;
nr_modulation
(
nr_gold_csi_rs
[
symb
+
lp
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
lp
]);
if
((
csi_params
.
row
==
13
)
||
(
csi_params
.
row
==
16
))
if
((
csi_params
->
row
==
13
)
||
(
csi_params
->
row
==
16
))
nr_modulation
(
nr_gold_csi_rs
[
symb
+
1
],
csi_length
,
DMRS_MOD_ORDER
,
mod_csi
[
symb
+
1
]);
}
}
...
...
@@ -590,7 +605,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
// resource mapping according to 38.211 7.4.1.5.3
for
(
n
=
csi_start
;
n
<
(
csi_start
+
csi_bw
);
n
++
)
{
if
(
(
csi_params
.
freq_density
>
1
)
||
(
csi_params
.
freq_density
==
(
n
%
2
)))
{
// for freq density 0.5 checks if even or odd RB
if
(
(
csi_params
->
freq_density
>
1
)
||
(
csi_params
->
freq_density
==
(
n
%
2
)))
{
// for freq density 0.5 checks if even or odd RB
for
(
int
ji
=
0
;
ji
<
size
;
ji
++
)
{
// loop over CDM groups
for
(
int
s
=
0
;
s
<
gs
;
s
++
)
{
// loop over each CDM group size
p
=
s
+
j
[
ji
]
*
gs
;
// port index
...
...
@@ -620,7 +635,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
wt
=
-
1
;
}
// ZP CSI RS
if
(
csi_params
.
csi_type
==
2
)
{
if
(
csi_params
->
csi_type
==
2
)
{
((
int16_t
*
)
dataF
[
p
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
(
2
*
dataF_offset
)]
=
0
;
((
int16_t
*
)
dataF
[
p
])[((
l
*
frame_parms
.
ofdm_symbol_size
+
k
)
<<
1
)
+
1
+
(
2
*
dataF_offset
)]
=
0
;
}
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
35324cfa
...
...
@@ -339,7 +339,7 @@ void nr_generate_csi_rs(NR_DL_FRAME_PARMS frame_parms,
int32_t
**
dataF
,
int16_t
amp
,
nr_csi_rs_info_t
*
nr_csi_rs_info
,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
csi_params
,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
,
uint16_t
cell_id
,
int
slot
);
...
...
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
View file @
35324cfa
...
...
@@ -36,6 +36,7 @@
#include "nr_transport_proto_ue.h"
#include "PHY/phy_extern_nr_ue.h"
#include "common/utils/nr/nr_common.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
//#define NR_CSIRS_DEBUG
...
...
@@ -71,5 +72,13 @@ int nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
LOG_I
(
NR_PHY
,
"csirs_config_pdu->power_control_offset_ss = %i
\n
"
,
csirs_config_pdu
->
power_control_offset_ss
);
#endif
nr_generate_csi_rs
(
ue
->
frame_parms
,
ue
->
nr_csi_rs_info
->
csi_rs_received_signal
,
AMP
,
ue
->
nr_csi_rs_info
,
(
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
)
csirs_config_pdu
,
ue
->
frame_parms
.
first_carrier_offset
,
proc
->
nr_slot_rx
);
return
0
;
}
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
35324cfa
...
...
@@ -348,6 +348,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc,
nr_gold_pdsch
(
ue
,
ue
->
scramblingID
);
nr_init_csi_rs
(
fp
,
ue
->
nr_csi_rs_info
->
nr_gold_csi_rs
,
fp
->
Nid_cell
);
// initialize the pusch dmrs
uint16_t
N_n_scid
[
2
]
=
{
fp
->
Nid_cell
,
fp
->
Nid_cell
};
int
n_scid
=
0
;
// This quantity is indicated by higher layer parameter dmrs-SeqInitialization
...
...
openair1/PHY/defs_nr_UE.h
View file @
35324cfa
...
...
@@ -986,6 +986,9 @@ typedef struct {
/// SRS variables
nr_srs_info_t
*
nr_srs_info
;
/// CSI-RS variables
nr_csi_rs_info_t
*
nr_csi_rs_info
;
//#if defined(UPGRADE_RAT_NR)
#if 1
SystemInformationBlockType1_nr_t
systemInformationBlockType1_nr
;
...
...
openair1/PHY/defs_nr_common.h
View file @
35324cfa
...
...
@@ -268,6 +268,7 @@ typedef struct {
uint32_t
***
nr_gold_csi_rs
;
uint16_t
sc_list_length
;
uint16_t
sc_list
[
6
*
NR_MAX_NB_RB
];
int32_t
**
csi_rs_received_signal
;
}
nr_csi_rs_info_t
;
typedef
struct
NR_DL_FRAME_PARMS
NR_DL_FRAME_PARMS
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
35324cfa
...
...
@@ -179,7 +179,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
NR_gNB_CSIRS_t
*
csirs
=
&
msgTx
->
csirs_pdu
[
i
];
if
(
csirs
->
active
==
1
)
{
LOG_D
(
PHY
,
"CSI-RS generation started in frame %d.%d
\n
"
,
frame
,
slot
);
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
csi_params
=
csirs
->
csirs_pdu
.
csi_rs_pdu_rel15
;
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
*
csi_params
=
&
csirs
->
csirs_pdu
.
csi_rs_pdu_rel15
;
nr_generate_csi_rs
(
gNB
->
frame_parms
,
gNB
->
common_vars
.
txdataF
,
AMP
,
gNB
->
nr_csi_rs_info
[
i
],
csi_params
,
gNB
->
gNB_config
.
cell_config
.
phy_cell_id
.
value
,
slot
);
csirs
->
active
=
0
;
}
...
...
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