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
wangwenhui
OpenXG-RAN
Commits
31857281
Commit
31857281
authored
Nov 13, 2019
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some updates in uplink and downlink channel estimations
parent
c3fcee20
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
89 additions
and
125 deletions
+89
-125
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+43
-61
openair1/PHY/NR_UE_ESTIMATION/filt16a_32.c
openair1/PHY/NR_UE_ESTIMATION/filt16a_32.c
+2
-2
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+44
-62
No files found.
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
View file @
31857281
...
@@ -37,7 +37,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -37,7 +37,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
nb_rb_pusch
)
unsigned
short
nb_rb_pusch
)
{
{
int
pilot
[
132
0
]
__attribute__
((
aligned
(
16
)));
int
pilot
[
328
0
]
__attribute__
((
aligned
(
16
)));
unsigned
char
aarx
;
unsigned
char
aarx
;
unsigned
short
k
;
unsigned
short
k
;
unsigned
int
pilot_cnt
;
unsigned
int
pilot_cnt
;
...
@@ -264,31 +264,20 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -264,31 +264,20 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
uint16_t
idxPil
=
idxDC
/
2
;
uint16_t
idxPil
=
idxDC
/
2
;
re_offset
=
k
;
re_offset
=
k
;
pil
=
(
int16_t
*
)
&
pilot
[
0
];
pil
=
(
int16_t
*
)
&
pilot
[
0
];
pil
+=
(
idxPil
-
2
);
// for proper allignment of SIMD vectors
ul_ch
+=
(
idxDC
-
4
);
if
((
gNB
->
frame_parms
.
N_RB_UL
&
1
)
==
0
)
{
ul_ch
=
memset
(
ul_ch
,
0
,
sizeof
(
int16_t
)
*
10
);
pil
+=
(
idxPil
-
4
);
re_offset
=
(
re_offset
+
idxDC
/
2
-
2
)
&
(
gNB
->
frame_parms
.
ofdm_symbol_size
-
1
);
ul_ch
+=
(
idxDC
-
8
);
ul_ch
=
memset
(
ul_ch
,
0
,
sizeof
(
int16_t
)
*
14
);
re_offset
=
(
re_offset
+
idxDC
/
2
-
4
)
&
(
gNB
->
frame_parms
.
ofdm_symbol_size
-
1
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
multadd_real_vector_complex_scalar
(
fl
,
// for proper allignment of SIMD vectors
ch
,
if
((
gNB
->
frame_parms
.
N_RB_UL
&
1
)
==
0
)
{
ul_ch
,
8
);
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
gNB
->
frame_parms
.
ofdm_symbol_size
-
1
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
multadd_real_vector_complex_scalar
(
filt8_dcl
,
multadd_real_vector_complex_scalar
(
filt8_dcl
,
ch
,
ch
,
ul_ch
,
ul_ch
-
4
,
8
);
8
);
pil
+=
4
;
pil
+=
4
;
...
@@ -299,16 +288,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -299,16 +288,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
multadd_real_vector_complex_scalar
(
filt8_dcr
,
multadd_real_vector_complex_scalar
(
filt8_dcr
,
ch
,
ch
,
ul_ch
,
ul_ch
-
4
,
8
);
8
);
}
else
{
}
else
{
pil
+=
(
idxPil
-
2
);
ul_ch
+=
(
idxDC
-
4
);
ul_ch
=
memset
(
ul_ch
,
0
,
sizeof
(
int16_t
)
*
10
);
re_offset
=
(
re_offset
+
idxDC
/
2
-
2
)
&
(
gNB
->
frame_parms
.
ofdm_symbol_size
-
1
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
multadd_real_vector_complex_scalar
(
filt8_dcl_h
,
multadd_real_vector_complex_scalar
(
filt8_dcl_h
,
ch
,
ch
,
...
@@ -330,11 +312,11 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
...
@@ -330,11 +312,11 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
}
}
#ifdef DEBUG_PDSCH
#ifdef DEBUG_PDSCH
ul_ch
=
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
ch_offset
];
ul_ch
=
(
int16_t
*
)
&
ul_ch_estimates
[
aarx
][
ch_offset
];
for
(
uint16_t
idxP
=
0
;
idxP
<
(
nb_rb_pusch
*
12
/
8
);
idxP
++
)
{
for
(
uint16_t
idxP
=
0
;
idxP
<
ceil
((
float
)
nb_rb_pusch
*
12
/
8
);
idxP
++
)
{
for
(
uint8_t
idxI
=
0
;
idxI
<
16
;
idxI
+=
2
)
{
for
(
uint8_t
idxI
=
0
;
idxI
<
16
;
idxI
+=
2
)
{
printf
(
"%d
\t
%d
\t
"
,
ul_ch
[
idxP
*
16
+
idxI
],
ul_ch
[
idxP
*
16
+
idxI
+
1
]);
printf
(
"%d
\t
%d
\t
"
,
ul_ch
[
idxP
*
16
+
idxI
],
ul_ch
[
idxP
*
16
+
idxI
+
1
]);
}
}
printf
(
"
\n
"
);
printf
(
"
%d
\n
"
,
idxP
);
}
}
#endif
#endif
// Convert to time domain
// Convert to time domain
...
...
openair1/PHY/NR_UE_ESTIMATION/filt16a_32.c
View file @
31857281
...
@@ -136,7 +136,7 @@ short filt8_dcmd[8]= {
...
@@ -136,7 +136,7 @@ short filt8_dcmd[8]= {
0
,
0
,
0
,
4096
,
4096
,
8192
,
12288
,
16384
};
0
,
0
,
0
,
4096
,
4096
,
8192
,
12288
,
16384
};
short
filt8_dcl
[
8
]
=
{
short
filt8_dcl
[
8
]
=
{
0
,
8192
,
16384
,
12288
,
8192
,
4096
,
0
,
0
};
0
,
0
,
16384
,
12288
,
8192
,
4096
,
0
,
0
};
short
filt8_dcr
[
8
]
=
{
short
filt8_dcr
[
8
]
=
{
0
,
0
,
0
,
4096
,
8192
,
12288
,
16384
,
0
};
0
,
0
,
0
,
4096
,
8192
,
12288
,
16384
,
0
};
...
@@ -145,7 +145,7 @@ short filt8_dcl_h[8]= {
...
@@ -145,7 +145,7 @@ short filt8_dcl_h[8]= {
16384
,
12288
,
8192
,
4096
,
0
,
0
,
0
,
0
};
16384
,
12288
,
8192
,
4096
,
0
,
0
,
0
,
0
};
short
filt8_dcr_h
[
8
]
=
{
short
filt8_dcr_h
[
8
]
=
{
0
,
4096
,
8192
,
1228
,
16384
,
0
,
0
,
0
};
0
,
4096
,
8192
,
1228
8
,
16384
,
0
,
0
,
0
};
short
filt8_l1
[
8
]
=
{
short
filt8_l1
[
8
]
=
{
24576
,
16384
,
0
,
0
,
0
,
0
,
0
,
0
};
24576
,
16384
,
0
,
0
,
0
,
0
,
0
,
0
};
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
31857281
...
@@ -666,7 +666,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -666,7 +666,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
bwp_start_subcarrier
,
unsigned
short
nb_rb_pdsch
)
unsigned
short
nb_rb_pdsch
)
{
{
int
pilot
[
132
0
]
__attribute__
((
aligned
(
16
)));
int
pilot
[
328
0
]
__attribute__
((
aligned
(
16
)));
unsigned
char
aarx
;
unsigned
char
aarx
;
unsigned
short
k
;
unsigned
short
k
;
unsigned
int
pilot_cnt
;
unsigned
int
pilot_cnt
;
...
@@ -892,31 +892,20 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -892,31 +892,20 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
uint16_t
idxPil
=
idxDC
/
2
;
uint16_t
idxPil
=
idxDC
/
2
;
re_offset
=
k
;
re_offset
=
k
;
pil
=
(
int16_t
*
)
&
pilot
[
rb_offset
*
((
config_type
==
0
)
?
6
:
4
)];
pil
=
(
int16_t
*
)
&
pilot
[
rb_offset
*
((
config_type
==
0
)
?
6
:
4
)];
pil
+=
(
idxPil
-
2
);
// for proper allignment of SIMD vectors
dl_ch
+=
(
idxDC
-
4
);
if
((
ue
->
frame_parms
.
N_RB_DL
&
1
)
==
0
)
{
dl_ch
=
memset
(
dl_ch
,
0
,
sizeof
(
int16_t
)
*
10
);
pil
+=
(
idxPil
-
4
);
re_offset
=
(
re_offset
+
idxDC
/
2
-
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
dl_ch
+=
(
idxDC
-
8
);
dl_ch
=
memset
(
dl_ch
,
0
,
sizeof
(
int16_t
)
*
14
);
re_offset
=
(
re_offset
+
idxDC
/
2
-
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
multadd_real_vector_complex_scalar
(
fl
,
// for proper allignment of SIMD vectors
ch
,
if
((
ue
->
frame_parms
.
N_RB_DL
&
1
)
==
0
)
{
dl_ch
,
8
);
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
multadd_real_vector_complex_scalar
(
filt8_dcl
,
multadd_real_vector_complex_scalar
(
filt8_dcl
,
ch
,
ch
,
dl_ch
,
dl_ch
-
4
,
8
);
8
);
pil
+=
4
;
pil
+=
4
;
...
@@ -927,16 +916,9 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -927,16 +916,9 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
multadd_real_vector_complex_scalar
(
filt8_dcr
,
multadd_real_vector_complex_scalar
(
filt8_dcr
,
ch
,
ch
,
dl_ch
,
dl_ch
-
4
,
8
);
8
);
}
else
{
}
else
{
pil
+=
(
idxPil
-
2
);
dl_ch
+=
(
idxDC
-
4
);
dl_ch
=
memset
(
dl_ch
,
0
,
sizeof
(
int16_t
)
*
10
);
re_offset
=
(
re_offset
+
idxDC
/
2
-
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
1
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
1
]
+
(
int32_t
)
pil
[
1
]
*
rxF
[
0
])
>>
15
);
multadd_real_vector_complex_scalar
(
filt8_dcl_h
,
multadd_real_vector_complex_scalar
(
filt8_dcl_h
,
ch
,
ch
,
...
@@ -959,11 +941,11 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -959,11 +941,11 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
#ifdef DEBUG_PDSCH
#ifdef DEBUG_PDSCH
dl_ch
=
(
int16_t
*
)
&
dl_ch_estimates
[
aarx
][
ch_offset
];
dl_ch
=
(
int16_t
*
)
&
dl_ch_estimates
[
aarx
][
ch_offset
];
for
(
uint16_t
idxP
=
0
;
idxP
<
(
nb_rb_pdsch
*
12
/
8
);
idxP
++
)
{
for
(
uint16_t
idxP
=
0
;
idxP
<
ceil
((
float
)
nb_rb_pdsch
*
12
/
8
);
idxP
++
)
{
for
(
uint8_t
idxI
=
0
;
idxI
<
16
;
idxI
+=
2
)
{
for
(
uint8_t
idxI
=
0
;
idxI
<
16
;
idxI
+=
2
)
{
printf
(
"%d
\t
%d
\t
"
,
dl_ch
[
idxP
*
16
+
idxI
],
dl_ch
[
idxP
*
16
+
idxI
+
1
]);
printf
(
"%d
\t
%d
\t
"
,
dl_ch
[
idxP
*
16
+
idxI
],
dl_ch
[
idxP
*
16
+
idxI
+
1
]);
}
}
printf
(
"
\n
"
);
printf
(
"
%d
\n
"
,
idxP
);
}
}
#endif
#endif
}
}
...
...
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