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
lizhongxiao
OpenXG-RAN
Commits
834de1be
Commit
834de1be
authored
Dec 31, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
procedures to skip dlsch REs when they overlap with CSI at UE
parent
c808a7f3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
106 deletions
+101
-106
common/utils/nr/nr_common.c
common/utils/nr/nr_common.c
+11
-0
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+1
-1
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
+28
-23
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+32
-61
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+2
-1
openair1/SCHED_NR_UE/defs.h
openair1/SCHED_NR_UE/defs.h
+6
-4
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+21
-16
No files found.
common/utils/nr/nr_common.c
View file @
834de1be
...
...
@@ -780,6 +780,17 @@ uint32_t get_ssb_offset_to_pointA(uint32_t absoluteFrequencySSB,
return
ssb_offset_point_a
;
}
int
compute_csi_unav_res
(
int
start
,
int
end
,
uint32_t
*
csi_REs
)
{
int
unav_csi_res
=
0
;
for
(
int
i
=
start
;
i
<
end
;
i
++
)
{
for
(
int
j
=
0
;
j
<
12
;
j
++
)
{
unav_csi_res
+=
((
csi_REs
[
i
]
>>
j
)
&
0x01
);
}
}
return
unav_csi_res
;
}
int
get_delay_idx
(
int
delay
,
int
max_delay_comp
)
{
int
delay_idx
=
max_delay_comp
+
delay
;
...
...
common/utils/nr/nr_common.h
View file @
834de1be
...
...
@@ -123,7 +123,7 @@ static inline int get_num_dmrs(uint16_t dmrs_mask ) {
}
uint64_t
reverse_bits
(
uint64_t
in
,
int
n_bits
);
int
compute_csi_unav_res
(
int
start
,
int
end
,
uint32_t
*
csi_REs
);
int
get_first_ul_slot
(
int
nrofDownlinkSlots
,
int
nrofDownlinkSymbols
,
int
nrofUplinkSymbols
);
int
cce_to_reg_interleaving
(
const
int
R
,
int
k
,
int
n_shift
,
const
int
C
,
int
L
,
const
int
N_regs
);
int
get_SLIV
(
uint8_t
S
,
uint8_t
L
);
...
...
openair1/PHY/NR_UE_TRANSPORT/csi_rx.c
View file @
834de1be
...
...
@@ -194,8 +194,9 @@ int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue,
int32_t
csi_rs_received_signal
[][
ue
->
frame_parms
.
samples_per_slot_wCP
],
uint32_t
*
rsrp
,
int
*
rsrp_dBm
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
{
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
],
uint32_t
*
csi_REs
)
{
const
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
uint16_t
meas_count
=
0
;
uint32_t
rsrp_sum
=
0
;
...
...
@@ -215,12 +216,13 @@ int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue,
// loop over frequency resource elements within a group
for
(
int
kp
=
0
;
kp
<=
k_prime
;
kp
++
)
{
uint16_t
k
=
(
frame_parms
->
first_carrier_offset
+
(
rb
*
NR_NB_SC_PER_RB
)
+
k_overline
[
cdm_id
]
+
kp
)
%
frame_parms
->
ofdm_symbol_size
;
uint16_t
k
=
(
frame_parms
->
first_carrier_offset
+
(
rb
*
NR_NB_SC_PER_RB
)
+
k_overline
[
cdm_id
]
+
kp
)
%
frame_parms
->
ofdm_symbol_size
;
// loop over time resource elements within a group
for
(
int
lp
=
0
;
lp
<=
l_prime
;
lp
++
)
{
uint16_t
symb
=
lp
+
l_overline
[
cdm_id
];
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
csi_REs
[
symb
]
|=
(
1
<<
(
k_overline
[
cdm_id
]
+
kp
));
uint64_t
symbol_offset
=
symb
*
frame_parms
->
ofdm_symbol_size
;
c16_t
*
rx_signal
=
&
rxdataF
[
ant_rx
][
symbol_offset
];
c16_t
*
rx_csi_rs_signal
=
(
c16_t
*
)
&
csi_rs_received_signal
[
ant_rx
][
symbol_offset
];
rx_csi_rs_signal
[
k
].
r
=
rx_signal
[
k
].
r
;
...
...
@@ -730,12 +732,12 @@ int nr_csi_rs_cqi_estimation(const uint32_t precoded_sinr,
return
0
;
}
int
nr_csi_im_power_estimation
(
const
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
const
fapi_nr_dl_config_csiim_pdu_rel15_t
*
csiim_config_pdu
,
uint32_t
*
interference_plus_noise_power
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
{
void
nr_csi_im_power_estimation
(
const
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
const
fapi_nr_dl_config_csiim_pdu_rel15_t
*
csiim_config_pdu
,
uint32_t
*
interference_plus_noise_power
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
{
const
NR_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
const
uint16_t
end_rb
=
csiim_config_pdu
->
start_rb
+
csiim_config_pdu
->
nr_of_rbs
>
csiim_config_pdu
->
bwp_size
?
...
...
@@ -772,9 +774,9 @@ int nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue,
for
(
int
rb
=
csiim_config_pdu
->
start_rb
;
rb
<
end_rb
;
rb
++
)
{
uint16_t
sc0_offset
=
(
frame_parms
->
first_carrier_offset
+
rb
*
NR_NB_SC_PER_RB
)
%
frame_parms
->
ofdm_symbol_size
;
uint16_t
sc0_offset
=
(
frame_parms
->
first_carrier_offset
+
rb
*
NR_NB_SC_PER_RB
)
%
frame_parms
->
ofdm_symbol_size
;
for
(
int
sc_idx
=
0
;
sc_idx
<
4
;
sc_idx
++
)
{
for
(
int
sc_idx
=
0
;
sc_idx
<
4
;
sc_idx
++
)
{
uint16_t
sc
=
sc0_offset
+
csiim_config_pdu
->
k_csiim
[
sc_idx
];
if
(
sc
>=
frame_parms
->
ofdm_symbol_size
)
{
...
...
@@ -803,17 +805,16 @@ int nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue,
#ifdef NR_CSIIM_DEBUG
LOG_I
(
NR_PHY
,
"interference_plus_noise_power based on CSI-IM = %i
\n
"
,
*
interference_plus_noise_power
);
#endif
return
0
;
}
int
nr_ue_csi_im_procedures
(
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
void
nr_ue_csi_im_procedures
(
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
],
uint32_t
*
csi_REs
)
{
int
gNB_id
=
proc
->
gNB_id
;
if
(
!
ue
->
csiim_vars
[
gNB_id
]
->
active
)
{
return
-
1
;
LOG_E
(
NR_PHY
,
"Scheduling reception of CSI-IM that is not active
\n
"
)
;
}
const
fapi_nr_dl_config_csiim_pdu_rel15_t
*
csiim_config_pdu
=
(
fapi_nr_dl_config_csiim_pdu_rel15_t
*
)
&
ue
->
csiim_vars
[
gNB_id
]
->
csiim_config_pdu
;
...
...
@@ -828,10 +829,13 @@ int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue,
LOG_I
(
NR_PHY
,
"csiim_config_pdu->l_csiim = %i.%i.%i.%i
\n
"
,
csiim_config_pdu
->
l_csiim
[
0
],
csiim_config_pdu
->
l_csiim
[
1
],
csiim_config_pdu
->
l_csiim
[
2
],
csiim_config_pdu
->
l_csiim
[
3
]);
#endif
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
int
symb
=
csiim_config_pdu
->
l_csiim
[
i
];
int
re
=
csiim_config_pdu
->
k_csiim
[
i
];
csi_REs
[
symb
]
|=
(
1
<<
re
);
}
nr_csi_im_power_estimation
(
ue
,
proc
,
csiim_config_pdu
,
&
ue
->
nr_csi_info
->
interference_plus_noise_power
,
rxdataF
);
ue
->
nr_csi_info
->
csi_im_meas_computed
=
true
;
return
0
;
}
static
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t
convert_csirs_pdu
(
const
fapi_nr_dl_config_csirs_pdu_rel15_t
*
csirs_config_pdu
)
...
...
@@ -856,9 +860,9 @@ static nfapi_nr_dl_tti_csi_rs_pdu_rel15_t convert_csirs_pdu(const fapi_nr_dl_con
void
nr_ue_csi_rs_procedures
(
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
],
uint32_t
*
csi_REs
)
{
int
gNB_id
=
proc
->
gNB_id
;
if
(
!
ue
->
csirs_vars
[
gNB_id
]
->
active
)
{
return
;
...
...
@@ -946,7 +950,8 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
csi_rs_received_signal
,
&
rsrp
,
&
rsrp_dBm
,
rxdataF
);
rxdataF
,
csi_REs
);
// if we need to measure only RSRP no need to do channel estimation
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
834de1be
...
...
@@ -154,7 +154,8 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz,
uint8_t
Nl
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
dlDmrsSymbPos
,
int
chest_time_type
);
int
chest_time_type
,
uint32_t
csi_REs_symb
);
static
void
nr_dlsch_channel_level_median
(
uint32_t
rx_size_symbol
,
int32_t
dl_ch_estimates_ext
[][
rx_size_symbol
],
int32_t
*
median
,
int
n_tx
,
int
n_rx
,
int
length
);
...
...
@@ -249,7 +250,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
int
nbRx
,
int32_t
rxdataF_comp
[][
nbRx
][
rx_size_symbol
*
NR_SYMBOLS_PER_SLOT
],
c16_t
ptrs_phase_per_slot
[][
NR_SYMBOLS_PER_SLOT
],
int32_t
ptrs_re_per_slot
[][
NR_SYMBOLS_PER_SLOT
])
int32_t
ptrs_re_per_slot
[][
NR_SYMBOLS_PER_SLOT
],
uint32_t
csi_REs_symb
)
{
const
int
nl
=
dlsch
[
0
].
Nl
;
const
int
matrixSz
=
ue
->
frame_parms
.
nb_antennas_rx
*
nl
;
...
...
@@ -388,7 +390,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
nl
,
frame_parms
,
dlsch
[
0
].
dlsch_config
.
dlDmrsSymbPos
,
ue
->
chest_time
);
ue
->
chest_time
,
csi_REs_symb
);
if
(
meas_enabled
)
{
stop_meas
(
&
meas
);
LOG_D
(
PHY
,
...
...
@@ -1215,7 +1218,8 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz,
uint8_t
Nl
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
dlDmrsSymbPos
,
int
chest_time_type
)
int
chest_time_type
,
uint32_t
csi_REs_symb
)
{
if
(
config_type
==
NFAPI_NR_DMRS_TYPE1
)
{
AssertFatal
(
n_dmrs_cdm_groups
==
1
||
n_dmrs_cdm_groups
==
2
,
...
...
@@ -1242,7 +1246,7 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz,
int32_t
*
dl_ch0
=
&
dl_ch_estimates
[(
l
*
frame_parms
->
nb_antennas_rx
)
+
aarx
][
validDmrsEst
*
frame_parms
->
ofdm_symbol_size
];
int32_t
*
dl_ch0_ext
=
dl_ch_estimates_ext
[(
l
*
frame_parms
->
nb_antennas_rx
)
+
aarx
];
if
(
pilots
==
0
)
{
//data symbol only
if
(
pilots
==
0
&&
csi_REs_symb
==
0
)
{
//data symbol only
if
(
l
==
0
)
{
if
(
start_re
+
nb_rb_pdsch
*
NR_NB_SC_PER_RB
<=
frame_parms
->
ofdm_symbol_size
)
{
memcpy
(
rxF_ext
,
&
rxF
[
start_re
],
nb_rb_pdsch
*
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
...
...
@@ -1255,65 +1259,32 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz,
}
memcpy
(
dl_ch0_ext
,
dl_ch0
,
nb_rb_pdsch
*
NR_NB_SC_PER_RB
*
sizeof
(
int32_t
));
}
else
if
(
config_type
==
NFAPI_NR_DMRS_TYPE1
){
if
(
n_dmrs_cdm_groups
==
1
)
{
//data is multiplexed
if
(
l
==
0
)
{
unsigned
short
k
=
start_re
;
for
(
unsigned
short
j
=
0
;
j
<
6
*
nb_rb_pdsch
;
j
+=
3
)
{
rxF_ext
[
j
]
=
rxF
[
k
+
1
];
rxF_ext
[
j
+
1
]
=
rxF
[
k
+
3
];
rxF_ext
[
j
+
2
]
=
rxF
[
k
+
5
];
k
+=
6
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
else
{
int
j
=
0
;
int
k
=
start_re
;
int
max_cdm
=
(
config_type
==
NFAPI_NR_DMRS_TYPE1
)
?
2
:
3
;
int
shift
=
(
config_type
==
NFAPI_NR_DMRS_TYPE1
)
?
0
:
1
;
for
(
int
rb
=
0
;
rb
<
nb_rb_pdsch
;
rb
++
)
{
for
(
int
re
=
0
;
re
<
12
;
re
++
)
{
if
(((
re
>>
shift
)
%
max_cdm
)
<
n_dmrs_cdm_groups
)
{
// DMRS RE
AssertFatal
(((
csi_REs_symb
>>
re
)
&
0x01
)
==
0
,
"DMRS RE overlapping with CSI RE, it shouldn't happen
\n
"
);
}
}
for
(
unsigned
short
j
=
0
;
j
<
6
*
nb_rb_pdsch
;
j
+=
3
)
{
dl_ch0_ext
[
j
]
=
dl_ch0
[
1
];
dl_ch0_ext
[
j
+
1
]
=
dl_ch0
[
3
];
dl_ch0_ext
[
j
+
2
]
=
dl_ch0
[
5
];
dl_ch0
+=
6
;
}
}
}
else
{
//NFAPI_NR_DMRS_TYPE2
if
(
n_dmrs_cdm_groups
==
1
)
{
//data is multiplexed
if
(
l
==
0
)
{
unsigned
short
k
=
start_re
;
for
(
unsigned
short
j
=
0
;
j
<
8
*
nb_rb_pdsch
;
j
+=
4
)
{
rxF_ext
[
j
]
=
rxF
[
k
+
2
];
rxF_ext
[
j
+
1
]
=
rxF
[
k
+
3
];
rxF_ext
[
j
+
2
]
=
rxF
[
k
+
4
];
rxF_ext
[
j
+
3
]
=
rxF
[
k
+
5
];
k
+=
6
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
else
{
// DATA RE
if
(((
csi_REs_symb
>>
re
)
&
0x01
)
==
0
)
{
// Process RE only if not overlapping with CSI
if
(
l
==
0
)
rxF_ext
[
j
]
=
rxF
[
k
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
re
];
j
++
;
}
}
k
++
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
for
(
unsigned
short
j
=
0
;
j
<
8
*
nb_rb_pdsch
;
j
+=
4
)
{
dl_ch0_ext
[
j
]
=
dl_ch0
[
2
];
dl_ch0_ext
[
j
+
1
]
=
dl_ch0
[
3
];
dl_ch0_ext
[
j
+
2
]
=
dl_ch0
[
4
];
dl_ch0_ext
[
j
+
3
]
=
dl_ch0
[
5
];
dl_ch0
+=
6
;
}
}
else
if
(
n_dmrs_cdm_groups
==
2
)
{
//data is multiplexed
if
(
l
==
0
)
{
unsigned
short
k
=
start_re
;
for
(
unsigned
short
j
=
0
;
j
<
4
*
nb_rb_pdsch
;
j
+=
2
)
{
rxF_ext
[
j
]
=
rxF
[
k
+
4
];
rxF_ext
[
j
+
1
]
=
rxF
[
k
+
5
];
k
+=
6
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
for
(
unsigned
short
j
=
0
;
j
<
4
*
nb_rb_pdsch
;
j
+=
2
)
{
dl_ch0_ext
[
j
]
=
dl_ch0
[
4
];
dl_ch0_ext
[
j
+
1
]
=
dl_ch0
[
5
];
dl_ch0
+=
6
;
}
dl_ch0
+=
12
;
}
}
}
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
834de1be
...
...
@@ -417,7 +417,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
int
nbRx
,
int32_t
rxdataF_comp
[][
nbRx
][
rx_size_symbol
*
NR_SYMBOLS_PER_SLOT
],
c16_t
ptrs_phase_per_slot
[][
NR_SYMBOLS_PER_SLOT
],
int32_t
ptrs_re_per_slot
[][
NR_SYMBOLS_PER_SLOT
]);
int32_t
ptrs_re_per_slot
[][
NR_SYMBOLS_PER_SLOT
],
uint32_t
csi_REs_symb
);
int32_t
generate_nr_prach
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
gNB_id
,
int
frame
,
uint8_t
slot
);
...
...
openair1/SCHED_NR_UE/defs.h
View file @
834de1be
...
...
@@ -157,13 +157,15 @@ int nr_ue_pdcch_procedures(PHY_VARS_NR_UE *ue,
int
n_ss
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
]);
int
nr_ue_csi_im_procedures
(
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
]);
void
nr_ue_csi_im_procedures
(
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
],
uint32_t
*
csi_REs
);
void
nr_ue_csi_rs_procedures
(
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
]);
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
],
uint32_t
*
csi_REs
);
#endif
/** @}*/
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
834de1be
...
...
@@ -492,7 +492,8 @@ static int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
const
UE_nr_rxtx_proc_t
*
proc
,
NR_UE_DLSCH_t
dlsch
[
2
],
int16_t
*
llr
[
2
],
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
])
c16_t
rxdataF
[][
ue
->
frame_parms
.
samples_per_slot_wCP
],
uint32_t
csi_REs
[
NR_SYMBOLS_PER_SLOT
])
{
int
frame_rx
=
proc
->
frame_rx
;
int
nr_slot_rx
=
proc
->
nr_slot_rx
;
...
...
@@ -500,7 +501,7 @@ static int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
int
first_symbol_flag
=
0
;
// We handle only one CW now
if
(
!
(
NR_MAX_NB_LAYERS
>
4
))
{
if
(
!
(
NR_MAX_NB_LAYERS
>
4
))
{
NR_UE_DLSCH_t
*
dlsch0
=
&
dlsch
[
0
];
int
harq_pid
=
dlsch0
->
dlsch_config
.
harq_process_nbr
;
NR_DL_UE_HARQ_t
*
dlsch0_harq
=
&
ue
->
dl_harq_processes
[
0
][
harq_pid
];
...
...
@@ -616,7 +617,8 @@ static int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue,
ue
->
frame_parms
.
nb_antennas_rx
,
rxdataF_comp
,
ptrs_phase_per_slot
,
ptrs_re_per_slot
)
ptrs_re_per_slot
,
csi_REs
[
m
])
<
0
)
return
-
1
;
...
...
@@ -646,7 +648,11 @@ static void send_dl_done_to_tx_thread(notifiedFIFO_t *nf, int rx_slot)
}
}
static
bool
nr_ue_dlsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
NR_UE_DLSCH_t
dlsch
[
2
],
int16_t
*
llr
[
2
])
static
bool
nr_ue_dlsch_procedures
(
PHY_VARS_NR_UE
*
ue
,
const
UE_nr_rxtx_proc_t
*
proc
,
NR_UE_DLSCH_t
dlsch
[
2
],
int16_t
*
llr
[
2
],
uint32_t
csi_REs
[
NR_SYMBOLS_PER_SLOT
])
{
if
(
dlsch
[
0
].
active
==
false
)
{
LOG_E
(
PHY
,
"DLSCH should be active when calling this function
\n
"
);
...
...
@@ -673,10 +679,10 @@ static bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *
uint8_t
nb_re_dmrs
;
if
(
dmrs_type
==
NFAPI_NR_DMRS_TYPE1
)
{
nb_re_dmrs
=
6
*
dlsch
[
0
].
dlsch_config
.
n_dmrs_cdm_groups
;
nb_re_dmrs
=
6
*
dlsch
[
0
].
dlsch_config
.
n_dmrs_cdm_groups
;
}
else
{
nb_re_dmrs
=
4
*
dlsch
[
0
].
dlsch_config
.
n_dmrs_cdm_groups
;
nb_re_dmrs
=
4
*
dlsch
[
0
].
dlsch_config
.
n_dmrs_cdm_groups
;
}
LOG_D
(
PHY
,
"AbsSubframe %d.%d Start LDPC Decoder for CW0 [harq_pid %d] ? %d
\n
"
,
frame_rx
%
1024
,
nr_slot_rx
,
harq_pid
,
is_cw0_active
);
...
...
@@ -780,6 +786,7 @@ static bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *
int
ptrsSymbPerSlot
=
get_ptrs_symbols_in_slot
(
ptrsSymbPos
,
dlsch_config
->
start_symbol
,
dlsch_config
->
number_symbols
);
unav_res
=
n_ptrs
*
ptrsSymbPerSlot
;
}
unav_res
+=
compute_csi_unav_res
(
dlsch_config
->
start_symbol
,
dlsch_config
->
start_symbol
+
dlsch_config
->
number_symbols
,
csi_REs
);
dl_harq1
->
G
=
nr_get_G
(
dlsch_config
->
number_rbs
,
nb_symb_sch
,
nb_re_dmrs
,
...
...
@@ -1027,7 +1034,8 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
// do procedures for C-RNTI
int
ret_pdsch
=
0
;
int
slot_fep_bitmap
[
14
]
=
{
0
};
int
slot_fep_bitmap
[
NR_SYMBOLS_PER_SLOT
]
=
{
0
};
uint32_t
csi_REs
[
NR_SYMBOLS_PER_SLOT
]
=
{
0
};
const
uint32_t
rxdataF_sz
=
ue
->
frame_parms
.
samples_per_slot_wCP
;
__attribute__
((
aligned
(
32
)))
c16_t
rxdataF
[
ue
->
frame_parms
.
nb_antennas_rx
][
rxdataF_sz
];
...
...
@@ -1040,7 +1048,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
slot_fep_bitmap
[
symb
]
=
1
;
}
}
nr_ue_csi_im_procedures
(
ue
,
proc
,
rxdataF
);
nr_ue_csi_im_procedures
(
ue
,
proc
,
rxdataF
,
csi_REs
);
ue
->
csiim_vars
[
gNB_id
]
->
active
=
0
;
}
...
...
@@ -1054,7 +1062,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
}
}
}
nr_ue_csi_rs_procedures
(
ue
,
proc
,
rxdataF
);
nr_ue_csi_rs_procedures
(
ue
,
proc
,
rxdataF
,
csi_REs
);
ue
->
csirs_vars
[
gNB_id
]
->
active
=
0
;
}
...
...
@@ -1069,7 +1077,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
for
(
int
m
=
start_symb_sch
;
m
<
(
nb_symb_sch
+
start_symb_sch
)
;
m
++
)
{
if
(
slot_fep_bitmap
[
m
]
==
0
)
{
nr_slot_fep
(
ue
,
proc
,
m
,
rxdataF
);
slot_fep_bitmap
[
m
]
=
2
;
slot_fep_bitmap
[
m
]
=
1
;
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDSCH
,
VCD_FUNCTION_OUT
);
...
...
@@ -1094,6 +1102,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
int
ptrsSymbPerSlot
=
get_ptrs_symbols_in_slot
(
ptrsSymbPos
,
dlsch_config
->
start_symbol
,
dlsch_config
->
number_symbols
);
unav_res
=
n_ptrs
*
ptrsSymbPerSlot
;
}
unav_res
+=
compute_csi_unav_res
(
dlsch_config
->
start_symbol
,
dlsch_config
->
start_symbol
+
dlsch_config
->
number_symbols
,
csi_REs
);
NR_DL_UE_HARQ_t
*
dlsch0_harq
=
&
ue
->
dl_harq_processes
[
0
][
dlsch_config
->
harq_process_nbr
];
dlsch0_harq
->
G
=
nr_get_G
(
dlsch_config
->
number_rbs
,
dlsch_config
->
number_symbols
,
...
...
@@ -1109,11 +1118,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
llr
[
i
]
=
(
int16_t
*
)
malloc16_clear
(
rx_llr_buf_sz
*
sizeof
(
int16_t
));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C
,
VCD_FUNCTION_IN
);
ret_pdsch
=
nr_ue_pdsch_procedures
(
ue
,
proc
,
dlsch
,
llr
,
rxdataF
);
ret_pdsch
=
nr_ue_pdsch_procedures
(
ue
,
proc
,
dlsch
,
llr
,
rxdataF
,
csi_REs
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C
,
VCD_FUNCTION_OUT
);
...
...
@@ -1125,7 +1130,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
start_meas
(
&
ue
->
dlsch_procedures_stat
);
if
(
ret_pdsch
>=
0
)
nr_ue_dlsch_procedures
(
ue
,
proc
,
dlsch
,
llr
);
nr_ue_dlsch_procedures
(
ue
,
proc
,
dlsch
,
llr
,
csi_REs
);
else
{
LOG_E
(
NR_PHY
,
"Demodulation impossible, internal error
\n
"
);
send_dl_done_to_tx_thread
(
...
...
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