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
4db9c784
Commit
4db9c784
authored
May 06, 2021
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix PDSCH DMRS configuration type 2
parent
98533875
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
149 additions
and
221 deletions
+149
-221
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+0
-21
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+0
-8
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
+7
-8
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
+2
-1
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+40
-44
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
+10
-14
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
+9
-12
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+0
-1
openair1/PHY/impl_defs_nr.h
openair1/PHY/impl_defs_nr.h
+0
-29
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+48
-49
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+23
-27
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+1
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+9
-6
No files found.
openair1/PHY/INIT/nr_init.c
View file @
4db9c784
...
...
@@ -586,27 +586,6 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
exit
(
-
1
);
}
/*
LOG_I(PHY,"Initializing nFAPI for ULSCH, UE %d\n",i);
// [hna] added here for RT implementation
uint8_t harq_pid = 0;
nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[i+1][j]->harq_processes[harq_pid]->ulsch_pdu;
// --------- setting rel15_ul parameters ----------
rel15_ul->rnti = 0x1234;
rel15_ul->ulsch_pdu_rel15.start_rb = 0;
rel15_ul->ulsch_pdu_rel15.number_rbs = 50;
rel15_ul->ulsch_pdu_rel15.start_symbol = 2;
rel15_ul->ulsch_pdu_rel15.number_symbols = 12;
rel15_ul->ulsch_pdu_rel15.length_dmrs = gNB->dmrs_UplinkConfig.pusch_maxLength;
rel15_ul->ulsch_pdu_rel15.Qm = 2;
rel15_ul->ulsch_pdu_rel15.R = 679;
rel15_ul->ulsch_pdu_rel15.mcs = 9;
rel15_ul->ulsch_pdu_rel15.rv = 0;
rel15_ul->ulsch_pdu_rel15.n_layers = 1;
///////////////////////////////////////////////////
*/
}
}
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
4db9c784
...
...
@@ -142,8 +142,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
uint16_t
N_n_scid
[
2
]
=
{
0
,
1
};
// [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
int
n_scid
;
abstraction_flag
=
0
;
// dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig;
// ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
LOG_I
(
PHY
,
"Initializing UE vars (abstraction %u) for gNB TXant %u, UE RXant %u
\n
"
,
abstraction_flag
,
fp
->
nb_antennas_tx
,
fp
->
nb_antennas_rx
);
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_gNB_INST);
phy_init_nr_top
(
ue
);
...
...
@@ -201,13 +199,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
}
//------------- config DMRS parameters--------------//
// dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1;
// dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
// dmrs_Uplink_Config->pusch_maxLength = pusch_len1;
//-------------------------------------------------//
ue
->
dmrs_DownlinkConfig
.
pdsch_dmrs_type
=
pdsch_dmrs_type1
;
ue
->
dmrs_DownlinkConfig
.
pdsch_dmrs_AdditionalPosition
=
pdsch_dmrs_pos0
;
ue
->
dmrs_DownlinkConfig
.
pdsch_maxLength
=
pdsch_len1
;
//-------------------------------------------------//
ue
->
nr_gold_pusch_dmrs
=
(
uint32_t
****
)
malloc16
(
fp
->
slots_per_frame
*
sizeof
(
uint32_t
***
));
...
...
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
View file @
4db9c784
...
...
@@ -111,9 +111,10 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
int32_t
*
output
,
unsigned
short
p
,
unsigned
char
lp
,
unsigned
short
nb_pdsch_rb
)
unsigned
short
nb_pdsch_rb
,
uint8_t
config_type
)
{
int8_t
w
,
config_type
;
int8_t
w
;
short
*
mod_table
;
unsigned
char
idx
=
0
;
...
...
@@ -121,18 +122,16 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
array_of_w
*
wf
;
array_of_w
*
wt
;
config_type
=
ue
->
dmrs_DownlinkConfig
.
pdsch_dmrs_type
;
wf
=
(
config_type
==
pdsch_dmrs_type1
)
?
wf1
:
wf2
;
wt
=
(
config_type
==
pdsch_dmrs_type1
)
?
wt1
:
wt2
;
wf
=
(
config_type
==
NFAPI_NR_DMRS_TYPE1
)
?
wf1
:
wf2
;
wt
=
(
config_type
==
NFAPI_NR_DMRS_TYPE1
)
?
wt1
:
wt2
;
if
(
config_type
>
1
)
LOG_E
(
PHY
,
"Bad PDSCH DMRS config type %d
\n
"
,
config_type
);
if
((
p
>=
1000
)
&&
(
p
<
((
config_type
==
pdsch_dmrs_type
1
)
?
1008
:
1012
)))
{
if
((
p
>=
1000
)
&&
(
p
<
((
config_type
==
NFAPI_NR_DMRS_TYPE
1
)
?
1008
:
1012
)))
{
if
(
ue
->
frame_parms
.
Ncp
==
NORMAL
)
{
for
(
int
i
=
0
;
i
<
nb_pdsch_rb
*
((
config_type
==
pdsch_dmrs_type
1
)
?
6
:
4
);
i
++
)
{
for
(
int
i
=
0
;
i
<
nb_pdsch_rb
*
((
config_type
==
NFAPI_NR_DMRS_TYPE
1
)
?
6
:
4
);
i
++
)
{
w
=
(
wf
[
p
-
1000
][
i
&
1
])
*
(
wt
[
p
-
1000
][
lp
]);
mod_table
=
(
w
==
1
)
?
nr_rx_mod_table
:
nr_rx_nmod_table
;
...
...
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
View file @
4db9c784
...
...
@@ -52,7 +52,8 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
int32_t
*
output
,
unsigned
short
p
,
unsigned
char
lp
,
unsigned
short
nb_pdsch_rb
);
unsigned
short
nb_pdsch_rb
,
uint8_t
config_type
);
void
nr_gold_pbch
(
PHY_VARS_NR_UE
*
ue
);
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
4db9c784
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h
View file @
4db9c784
...
...
@@ -34,17 +34,14 @@
/*!
\brief This function performs channel estimation including frequency and temporal interpolation
\param phy_vars_ue Pointer to UE PHY variables
\param eNB_id Index of target eNB
\param eNB_offset Offset for interfering eNB (in terms cell ID mod 3)
\param ue Pointer to UE PHY variables
\param gNB_id Index of target gNB
\param Ns slot number (0..19)
\param p antenna port
\param l symbol within slot
\param symbol symbol within frame
\param symbol symbol within slot
*/
int
nr_pdcch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_offset
,
uint8_t
gNB_id
,
unsigned
char
Ns
,
unsigned
char
symbol
,
unsigned
short
coreset_start_subcarrier
,
...
...
@@ -52,7 +49,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
int
nr_pbch_dmrs_correlation
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_offset
,
uint8_t
gNB_id
,
unsigned
char
Ns
,
unsigned
char
symbol
,
int
dmrss
,
...
...
@@ -60,7 +57,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
int
nr_pbch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_offset
,
uint8_t
gNB_id
,
unsigned
char
Ns
,
unsigned
char
symbol
,
int
dmrss
,
...
...
@@ -69,7 +66,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
int
nr_pdsch_channel_estimation
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_offset
,
uint8_t
gNB_id
,
bool
is_SI
,
unsigned
char
Ns
,
unsigned
short
p
,
...
...
@@ -80,7 +77,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
void
nr_adjust_synch_ue
(
NR_DL_FRAME_PARMS
*
frame_parms
,
PHY_VARS_NR_UE
*
ue
,
module_id_t
e
NB_id
,
module_id_t
g
NB_id
,
uint8_t
frame
,
uint8_t
subframe
,
unsigned
char
clear
,
...
...
@@ -102,7 +99,7 @@ void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
void
phy_adjust_gain_nr
(
PHY_VARS_NR_UE
*
ue
,
uint32_t
rx_power_fil_dB
,
uint8_t
e
NB_id
);
uint8_t
g
NB_id
);
int16_t
get_nr_PL
(
uint8_t
Mod_id
,
uint8_t
CC_id
,
uint8_t
gNB_index
);
...
...
@@ -111,11 +108,10 @@ void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_UE_HARQ_t
*
dlsch0_harq
,
NR_DL_UE_HARQ_t
*
dlsch1_harq
,
uint8_t
e
NB_id
,
uint8_t
g
NB_id
,
uint8_t
nr_slot_rx
,
unsigned
char
symbol
,
uint32_t
nb_re_pdsch
,
unsigned
char
harq_pid
,
uint16_t
rnti
,
RX_type_t
rx_type
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c
View file @
4db9c784
...
...
@@ -186,8 +186,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
//int16_t *pllr_symbol_cw0_deint;
//int16_t *pllr_symbol_cw1_deint;
//uint16_t bundle_L = 2;
uint8_t
pilots
=
0
;
uint8_t
config_type
;
// We should not use ue->dmrs_DownlinkConfig.pdsch_dmrs_type;
uint16_t
n_tx
=
1
,
n_rx
=
1
;
int32_t
median
[
16
];
uint32_t
len
;
...
...
@@ -344,8 +342,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
printf
(
"Demod dlsch0_harq->pmi_alloc %d
\n
"
,
dlsch0_harq
->
pmi_alloc
);
#endif
pilots
=
((
1
<<
symbol
)
&
dlsch0_harq
->
dlDmrsSymbPos
)
>
0
?
1
:
0
;
config_type
=
dlsch0_harq
->
dmrsConfigType
;
uint8_t
pilots
=
(
dlsch0_harq
->
dlDmrsSymbPos
>>
symbol
)
&
1
;
uint8_t
config_type
=
dlsch0_harq
->
dmrsConfigType
;
if
(
beamforming_mode
==
0
)
{
//No beamforming
#if UE_TIMING_TRACE
...
...
@@ -389,7 +387,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
return
(
-
1
);
}
len
=
(
pilots
==
1
)
?
((
config_type
==
pdsch_dmrs_type
1
)
?
nb_rb
*
(
12
-
6
*
dlsch0_harq
->
n_dmrs_cdm_groups
)
:
nb_rb
*
(
12
-
4
*
dlsch0_harq
->
n_dmrs_cdm_groups
))
:
(
nb_rb
*
12
);
len
=
(
pilots
==
1
)
?
((
config_type
==
NFAPI_NR_DMRS_TYPE
1
)
?
nb_rb
*
(
12
-
6
*
dlsch0_harq
->
n_dmrs_cdm_groups
)
:
nb_rb
*
(
12
-
4
*
dlsch0_harq
->
n_dmrs_cdm_groups
))
:
(
nb_rb
*
12
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
generic_stat_bis
[
proc
->
thread_id
][
slot
]);
...
...
@@ -643,7 +641,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
nr_slot_rx
,
symbol
,
(
nb_rb
*
12
),
harq_pid
,
dlsch
[
0
]
->
rnti
,
rx_type
);
pdsch_vars
[
gNB_id
]
->
dl_valid_re
[
symbol
-
1
]
-=
pdsch_vars
[
gNB_id
]
->
ptrs_re_per_slot
[
0
][
symbol
];
}
...
...
@@ -2061,7 +2058,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
unsigned
char
j
=
0
;
if
(
config_type
==
pdsch_dmrs_type
1
)
{
if
(
config_type
==
NFAPI_NR_DMRS_TYPE
1
)
{
AssertFatal
(
n_dmrs_cdm_groups
==
1
||
n_dmrs_cdm_groups
==
2
,
"n_dmrs_cdm_groups %d is illegal
\n
"
,
n_dmrs_cdm_groups
);
nushift
=
n_dmrs_cdm_groups
-
1
;
//delta in Table 7.4.1.1.2-1
...
...
@@ -2097,7 +2094,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
rxF_ext
+=
12
;
}
else
{
//the symbol contains DMRS
j
=
0
;
if
(
config_type
==
pdsch_dmrs_type
1
){
if
(
config_type
==
NFAPI_NR_DMRS_TYPE
1
){
if
(
nushift
==
0
)
{
//data is multiplexed
for
(
i
=
(
1
-
nushift
);
i
<
12
;
i
+=
2
)
{
rxF_ext
[
j
]
=
rxF
[
i
];
...
...
@@ -2107,7 +2104,7 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
dl_ch0_ext
+=
6
;
rxF_ext
+=
6
;
}
}
else
{
//
pdsch_dmrs_type
2
}
else
{
//
NFAPI_NR_DMRS_TYPE
2
for
(
i
=
(
2
+
nushift
);
i
<
6
;
i
++
)
{
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
...
...
@@ -2155,7 +2152,7 @@ unsigned short nr_dlsch_extract_rbs_multiple(int **rxdataF,
int
*
dl_ch0
,
*
dl_ch0_ext
,
*
rxF
,
*
rxF_ext
;
int8_t
validDmrsEst
=
0
;
//store last DMRS Symbol index
if
(
config_type
==
pdsch_dmrs_type
1
)
{
if
(
config_type
==
NFAPI_NR_DMRS_TYPE
1
)
{
AssertFatal
(
n_dmrs_cdm_groups
==
1
||
n_dmrs_cdm_groups
==
2
,
"n_dmrs_cdm_groups %d is illegal
\n
"
,
n_dmrs_cdm_groups
);
nushift
=
n_dmrs_cdm_groups
-
1
;
//delta in Table 7.4.1.1.2-1
...
...
@@ -2193,7 +2190,7 @@ unsigned short nr_dlsch_extract_rbs_multiple(int **rxdataF,
}
else
{
//the symbol contains DMRS
j
=
0
;
if
(
config_type
==
pdsch_dmrs_type
1
)
{
if
(
config_type
==
NFAPI_NR_DMRS_TYPE
1
)
{
if
(
nushift
==
0
)
{
//data is multiplexed
for
(
i
=
(
1
-
nushift
);
i
<
12
;
i
+=
2
)
{
if
(
aatx
==
0
)
rxF_ext
[
j
]
=
rxF
[
i
];
...
...
@@ -2204,7 +2201,7 @@ unsigned short nr_dlsch_extract_rbs_multiple(int **rxdataF,
if
(
aatx
==
0
)
rxF_ext
+=
6
;
}
}
else
{
//
pdsch_dmrs_type
2
else
{
//
NFAPI_NR_DMRS_TYPE
2
for
(
i
=
(
2
+
nushift
);
i
<
6
;
i
++
)
{
if
(
aatx
==
0
)
rxF_ext
[
j
]
=
rxF
[
i
];
dl_ch0_ext
[
j
]
=
dl_ch0
[
i
];
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
4db9c784
...
...
@@ -114,7 +114,6 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
NR_DL_FRAME_PARMS
*
frame_parms
=
&
UE
->
frame_parms
;
NR_UE_PUSCH
*
pusch_ue
=
UE
->
pusch_vars
[
thread_id
][
gNB_id
];
// ptrs_UplinkConfig_t *ptrs_Uplink_Config = &UE->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
uint8_t
num_of_codewords
=
1
;
// tmp assumption
int
Nid_cell
=
0
;
...
...
openair1/PHY/impl_defs_nr.h
View file @
4db9c784
...
...
@@ -493,10 +493,6 @@ typedef struct{ // The IE PUSCH-ServingCellConfig is used to configure UE specif
typedef
struct
{
// CSI-MeasConfig IE is used to configure CSI-RS (reference signals)
uint8_t
reportTriggerSize
;
}
csi_MeasConfig_t
;
typedef
enum
{
pdsch_dmrs_type1
=
0
,
pdsch_dmrs_type2
=
1
}
pdsch_dmrs_type_t
;
typedef
enum
{
pusch_dmrs_type1
=
0
,
pusch_dmrs_type2
=
1
...
...
@@ -518,10 +514,6 @@ typedef enum {
offset10
=
2
,
offset11
=
3
,
}
ptrs_resource_elementoffset_t
;
typedef
enum
{
pdsch_len1
=
1
,
pdsch_len2
=
2
}
pdsch_maxLength_t
;
typedef
enum
{
pusch_len1
=
1
,
pusch_len2
=
2
...
...
@@ -535,28 +527,11 @@ typedef struct {
uint16_t
n_rb0
;
uint16_t
n_rb1
;
}
ptrs_frequency_density_t
;
typedef
struct
{
// The IE PTRS-UplinkConfig is used to configure uplink Phase-Tracking-Reference-Signals (PTRS)
uint8_t
num_ptrs_ports
;
ptrs_resource_elementoffset_t
resourceElementOffset
;
ptrs_time_density_t
timeDensity
;
ptrs_frequency_density_t
frequencyDensity
;
uint32_t
ul_ptrs_power
;
}
ptrs_UplinkConfig_t
;
typedef
struct
{
// The IE DMRS-DownlinkConfig is used to configure downlink demodulation reference signals for PDSCH
pdsch_dmrs_type_t
pdsch_dmrs_type
;
pdsch_dmrs_AdditionalPosition_t
pdsch_dmrs_AdditionalPosition
;
pdsch_maxLength_t
pdsch_maxLength
;
uint16_t
scramblingID0
;
uint16_t
scramblingID1
;
}
dmrs_DownlinkConfig_t
;
typedef
struct
{
// The IE DMRS-UplinkConfig is used to configure uplink demodulation reference signals for PUSCH
pusch_dmrs_type_t
pusch_dmrs_type
;
pusch_dmrs_AdditionalPosition_t
pusch_dmrs_AdditionalPosition
;
pusch_maxLength_t
pusch_maxLength
;
ptrs_UplinkConfig_t
ptrs_UplinkConfig
;
uint16_t
scramblingID0
;
uint16_t
scramblingID1
;
}
dmrs_UplinkConfig_t
;
typedef
struct
{
/*
* Serving cell ID of a PSCell. The PCell of the Master Cell Group uses ID = 0
...
...
@@ -640,10 +615,6 @@ typedef struct {
* resourceAllocation
*/
ul_resourceAllocation_t
ul_resourceAllocation
;
/*
* DMRS-Uplinkconfig
*/
dmrs_UplinkConfig_t
dmrs_UplinkConfig
;
/*
* rgb_Size
*/
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
4db9c784
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
4db9c784
...
...
@@ -214,7 +214,7 @@ int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); }
// needed for some functions
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
void
update_ptrs_config
(
NR_CellGroupConfig_t
*
secondaryCellGroup
,
uint16_t
*
rbSize
,
uint8_t
*
mcsIndex
,
int8_t
*
ptrs_arg
);
void
update_dmrs_config
(
NR_CellGroupConfig_t
*
scg
,
PHY_VARS_NR_UE
*
ue
,
int8_t
*
dmrs_arg
);
void
update_dmrs_config
(
NR_CellGroupConfig_t
*
scg
,
int8_t
*
dmrs_arg
);
extern
void
fix_scd
(
NR_ServingCellConfig_t
*
scd
);
// forward declaration
/* specific dlsim DL preprocessor: uses rbStart/rbSize/mcs/nrOfLayers from command line of
...
...
@@ -742,7 +742,7 @@ int main(int argc, char **argv)
fix_scd
(
scd
);
/* -U option modify DMRS */
if
(
modify_dmrs
)
{
update_dmrs_config
(
secondaryCellGroup
,
NULL
,
dmrs_arg
);
update_dmrs_config
(
secondaryCellGroup
,
dmrs_arg
);
}
/* -T option enable PTRS */
if
(
enable_ptrs
)
{
...
...
@@ -872,9 +872,6 @@ int main(int argc, char **argv)
exit
(
-
1
);
}
if
(
modify_dmrs
)
{
update_dmrs_config
(
NULL
,
UE
,
dmrs_arg
);
}
init_nr_ue_transport
(
UE
,
0
);
nr_gold_pbch
(
UE
);
...
...
@@ -1402,11 +1399,12 @@ void update_ptrs_config(NR_CellGroupConfig_t *secondaryCellGroup, uint16_t *rbSi
rrc_config_dl_ptrs_params
(
bwp
,
ptrsFreqDenst
,
ptrsTimeDenst
,
&
epre_Ratio
,
&
reOffset
);
}
void
update_dmrs_config
(
NR_CellGroupConfig_t
*
scg
,
PHY_VARS_NR_UE
*
ue
,
int8_t
*
dmrs_arg
)
void
update_dmrs_config
(
NR_CellGroupConfig_t
*
scg
,
int8_t
*
dmrs_arg
)
{
int8_t
mapping_type
=
typeA
;
//default value
int8_t
add_pos
=
pdsch_dmrs_pos0
;
//default value
int8_t
dmrs_config_type
=
pdsch_dmrs_type1
;
//default value
int8_t
dmrs_config_type
=
NFAPI_NR_DMRS_TYPE1
;
//default value
if
(
dmrs_arg
[
0
]
==
0
)
{
mapping_type
=
typeA
;
}
...
...
@@ -1418,28 +1416,26 @@ void update_dmrs_config(NR_CellGroupConfig_t *scg,PHY_VARS_NR_UE *ue, int8_t* dm
add_pos
=
dmrs_arg
[
1
];
}
/* DMRS Conf Type 1 or 2 */
if
(
dmrs_arg
[
2
]
>=
1
&&
dmrs_arg
[
2
]
<
3
)
{
dmrs_config_type
=
dmrs_arg
[
2
]
-
1
;
if
(
dmrs_arg
[
2
]
==
1
)
{
dmrs_config_type
=
NFAPI_NR_DMRS_TYPE1
;
}
else
if
(
dmrs_arg
[
2
]
==
2
)
{
dmrs_config_type
=
NFAPI_NR_DMRS_TYPE2
;
}
if
(
scg
!=
NULL
)
{
NR_BWP_Downlink_t
*
bwp
=
scg
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
0
];
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
add_pos
;
if
(
dmrs_config_type
==
pdsch_dmrs_type2
)
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
));
else
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
=
NULL
;
for
(
int
i
=
0
;
i
<
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
count
;
i
++
)
{
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
array
[
i
]
->
mappingType
=
mapping_type
;
}
}
if
(
ue
!=
NULL
)
{
for
(
int
i
=
0
;
i
<
MAX_NR_OF_DL_ALLOCATIONS
;
i
++
)
{
ue
->
PDSCH_Config
.
pdsch_TimeDomainResourceAllocation
[
i
]
->
mappingType
=
mapping_type
;
}
ue
->
dmrs_DownlinkConfig
.
pdsch_dmrs_AdditionalPosition
=
add_pos
;
if
(
dmrs_config_type
==
pdsch_dmrs_type2
)
ue
->
dmrs_DownlinkConfig
.
pdsch_dmrs_type
=
pdsch_dmrs_type2
;
else
ue
->
dmrs_DownlinkConfig
.
pdsch_dmrs_type
=
pdsch_dmrs_type1
;
NR_BWP_Downlink_t
*
bwp
=
scg
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
0
];
NR_DMRS_DownlinkConfig_t
*
dmrs_config
;
if
(
mapping_type
==
typeA
)
dmrs_config
=
(
NR_DMRS_DownlinkConfig_t
*
)
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
;
else
dmrs_config
=
(
NR_DMRS_DownlinkConfig_t
*
)
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeB
->
choice
.
setup
;
*
dmrs_config
->
dmrs_AdditionalPosition
=
add_pos
;
if
(
dmrs_config_type
==
NFAPI_NR_DMRS_TYPE2
)
dmrs_config
->
dmrs_Type
=
calloc
(
1
,
sizeof
(
*
dmrs_config
->
dmrs_Type
));
else
dmrs_config
->
dmrs_Type
=
NULL
;
for
(
int
i
=
0
;
i
<
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
count
;
i
++
)
{
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
array
[
i
]
->
mappingType
=
mapping_type
;
}
printf
(
"[DLSIM] DMRS Config is modified with Mapping Type %d, Additional Positions %d Config. Type %d
\n
"
,
dmrs_arg
[
0
],
add_pos
,
dmrs_arg
[
2
]
);
}
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
4db9c784
...
...
@@ -2444,7 +2444,7 @@ uint8_t get_L_ptrs(uint8_t mcs1, uint8_t mcs2, uint8_t mcs3, uint8_t I_mcs, uint
*
* NAME : get_K_ptrs
*
* PARAMETERS :
ptrs_UplinkConfig
PTRS uplink configuration
* PARAMETERS :
nrb0, nrb1
PTRS uplink configuration
* N_RB number of RBs scheduled for PUSCH
*
* RETURN : the parameter K_ptrs
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
4db9c784
...
...
@@ -613,11 +613,14 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
pdu_type
=
FAPI_NR_DL_CONFIG_TYPE_DLSCH
;
}
if
(
(
ra
->
RA_window_cnt
>=
0
&&
rnti
==
ra
->
ra_rnti
)
||
(
rnti
==
ra
->
t_crnti
)
)
{
dlsch_config_pdu_1_0
->
BWPSize
=
NRRIV2BW
(
mac
->
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
if
(
get_softmodem_params
()
->
sa
)
{
dlsch_config_pdu_1_0
->
BWPSize
=
NRRIV2BW
(
mac
->
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
dlsch_config_pdu_1_0
->
BWPStart
=
NRRIV2PRBOFFSET
(
mac
->
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
dlsch_config_pdu_1_0
->
SubcarrierSpacing
=
mac
->
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
}
else
{
// NSA mode is not using the Initial BWP
dlsch_config_pdu_1_0
->
BWPSize
=
NRRIV2BW
(
mac
->
DLbwp
[
0
]
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
dlsch_config_pdu_1_0
->
BWPStart
=
NRRIV2PRBOFFSET
(
mac
->
DLbwp
[
0
]
->
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
dlsch_config_pdu_1_0
->
SubcarrierSpacing
=
mac
->
DLbwp
[
0
]
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
pdsch_config
=
mac
->
DLbwp
[
0
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
;
}
}
else
{
...
...
@@ -645,7 +648,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
mac
->
scc
->
dmrs_TypeA_Position
,
dlsch_config_pdu_1_0
->
number_symbols
,
dlsch_config_pdu_1_0
->
start_symbol
);
dlsch_config_pdu_1_0
->
dmrsConfigType
=
(
pdsch_config
)
?
(
mac
->
DLbwp
[
0
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
)
:
0
;
dlsch_config_pdu_1_0
->
dmrsConfigType
=
(
pdsch_config
)
?
(
pdsch_config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
NFAPI_NR_DMRS_TYPE1
:
NFAPI_NR_DMRS_TYPE2
)
:
NFAPI_NR_DMRS_TYPE1
;
/* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */
if
(
dlsch_config_pdu_1_0
->
number_symbols
==
2
)
dlsch_config_pdu_1_0
->
n_dmrs_cdm_groups
=
1
;
...
...
@@ -812,7 +815,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
mac
->
scc
->
dmrs_TypeA_Position
,
dlsch_config_pdu_1_1
->
number_symbols
,
dlsch_config_pdu_1_1
->
start_symbol
);
dlsch_config_pdu_1_1
->
dmrsConfigType
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
;
dlsch_config_pdu_1_1
->
dmrsConfigType
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
NFAPI_NR_DMRS_TYPE1
:
NFAPI_NR_DMRS_TYPE2
;
/* TODO: fix number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214,
using tables 7.3.1.2.2-1, 7.3.1.2.2-2, 7.3.1.2.2-3, 7.3.1.2.2-4 of 3GPP TS 38.212 */
dlsch_config_pdu_1_1
->
n_dmrs_cdm_groups
=
1
;
...
...
@@ -909,7 +912,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
dlsch_config_pdu_1_1
->
dmrs_ports
[
3
]
=
table_7_3_2_3_3_2_oneCodeword
[
dci
->
antenna_ports
.
val
][
4
];
dlsch_config_pdu_1_1
->
n_front_load_symb
=
table_7_3_2_3_3_2_oneCodeword
[
dci
->
antenna_ports
.
val
][
5
];
}
if
(
n_codewords
==
1
)
{
if
(
n_codewords
==
2
)
{
dlsch_config_pdu_1_1
->
n_dmrs_cdm_groups
=
table_7_3_2_3_3_2_twoCodeword
[
dci
->
antenna_ports
.
val
][
0
];
dlsch_config_pdu_1_1
->
dmrs_ports
[
0
]
=
table_7_3_2_3_3_2_twoCodeword
[
dci
->
antenna_ports
.
val
][
1
];
dlsch_config_pdu_1_1
->
dmrs_ports
[
1
]
=
table_7_3_2_3_3_2_twoCodeword
[
dci
->
antenna_ports
.
val
][
2
];
...
...
@@ -931,7 +934,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
dlsch_config_pdu_1_1
->
dmrs_ports
[
2
]
=
table_7_3_2_3_3_3_oneCodeword
[
dci
->
antenna_ports
.
val
][
3
];
dlsch_config_pdu_1_1
->
dmrs_ports
[
3
]
=
table_7_3_2_3_3_3_oneCodeword
[
dci
->
antenna_ports
.
val
][
4
];
}
if
(
n_codewords
==
1
)
{
if
(
n_codewords
==
2
)
{
dlsch_config_pdu_1_1
->
n_dmrs_cdm_groups
=
table_7_3_2_3_3_3_twoCodeword
[
dci
->
antenna_ports
.
val
][
0
];
dlsch_config_pdu_1_1
->
dmrs_ports
[
0
]
=
table_7_3_2_3_3_3_twoCodeword
[
dci
->
antenna_ports
.
val
][
1
];
dlsch_config_pdu_1_1
->
dmrs_ports
[
1
]
=
table_7_3_2_3_3_3_twoCodeword
[
dci
->
antenna_ports
.
val
][
2
];
...
...
@@ -951,7 +954,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
dlsch_config_pdu_1_1
->
dmrs_ports
[
3
]
=
table_7_3_2_3_3_4_oneCodeword
[
dci
->
antenna_ports
.
val
][
4
];
dlsch_config_pdu_1_1
->
n_front_load_symb
=
table_7_3_2_3_3_4_oneCodeword
[
dci
->
antenna_ports
.
val
][
5
];
}
if
(
n_codewords
==
1
)
{
if
(
n_codewords
==
2
)
{
dlsch_config_pdu_1_1
->
n_dmrs_cdm_groups
=
table_7_3_2_3_3_4_twoCodeword
[
dci
->
antenna_ports
.
val
][
0
];
dlsch_config_pdu_1_1
->
dmrs_ports
[
0
]
=
table_7_3_2_3_3_4_twoCodeword
[
dci
->
antenna_ports
.
val
][
1
];
dlsch_config_pdu_1_1
->
dmrs_ports
[
1
]
=
table_7_3_2_3_3_4_twoCodeword
[
dci
->
antenna_ports
.
val
][
2
];
...
...
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