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
Michael Black
OpenXG-RAN
Commits
865fdb98
Commit
865fdb98
authored
Mar 02, 2022
by
Sagar Parsawar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding DFT & IDFT for 768 size
parent
0286752f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
121 additions
and
2 deletions
+121
-2
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+3
-0
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+8
-0
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+4
-0
openair1/PHY/TOOLS/oai_dfts.c
openair1/PHY/TOOLS/oai_dfts.c
+103
-0
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+3
-2
No files found.
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
865fdb98
...
...
@@ -46,6 +46,9 @@ dft_size_idx_t get_dft_size_idx(uint16_t ofdm_symbol_size)
case
512
:
return
DFT_512
;
case
768
:
return
DFT_768
;
case
1024
:
return
DFT_1024
;
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
865fdb98
...
...
@@ -361,6 +361,10 @@ int nr_prs_channel_estimation(PHY_VARS_NR_UE *ue,
idftsizeidx
=
IDFT_512
;
break
;
case
768
:
idftsizeidx
=
IDFT_768
;
break
;
case
1024
:
idftsizeidx
=
IDFT_1024
;
break
;
...
...
@@ -829,6 +833,10 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
idftsizeidx
=
IDFT_512
;
break
;
case
768
:
idftsizeidx
=
IDFT_768
;
break
;
case
1024
:
idftsizeidx
=
IDFT_1024
;
break
;
...
...
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
View file @
865fdb98
...
...
@@ -78,6 +78,10 @@ idft_size_idx_t get_idft(int ofdm_symbol_size)
return
IDFT_512
;
break
;
case
768
:
return
IDFT_768
;
break
;
case
1024
:
return
IDFT_1024
;
break
;
...
...
openair1/PHY/TOOLS/oai_dfts.c
View file @
865fdb98
...
...
@@ -9059,6 +9059,7 @@ static int16_t twc768[191*2*4];
void dft768(int16_t *x,int16_t *y,unsigned char scale_flag) { // 192x 4;
#if 1
int i,j;
simd_q15_t *x128=(simd_q15_t *)x;
simd_q15_t *y128=(simd_q15_t *)y;
...
...
@@ -9108,7 +9109,109 @@ void dft768(int16_t *x,int16_t *y,unsigned char scale_flag) { // 192x 4;
_mm_empty();
_m_empty();
#else
int i,i2,j;
uint32_t tmp[3][256]__attribute__((aligned(32)));
uint32_t tmpo[3][256] __attribute__((aligned(32)));
simd_q15_t *y128p=(simd_q15_t*)y;
simd_q15_t ONE_OVER_SQRT3_Q15_128 = set1_int16(ONE_OVER_SQRT3_Q15);
for (i=0,j=0; i<256; i++) {
tmp[0][i] = ((uint32_t *)x)[j++];
tmp[1][i] = ((uint32_t *)x)[j++];
tmp[2][i] = ((uint32_t *)x)[j++];
}
dft256((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1);
dft256((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
dft256((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
for (i=0,i2=0; i<512; i+=8,i2+=4) {
bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(y+i),(simd_q15_t*)(y+512+i),(simd_q15_t*)(y+1024+i),
(simd_q15_t*)(twa768+i),(simd_q15_t*)(twb768+i));
}
if (scale_flag==1) {
for (i=0; i<12; i++) {
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
y128p[1] = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128);
y128p[2] = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128);
y128p[3] = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128);
y128p[4] = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128);
y128p[5] = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128);
y128p[6] = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128);
y128p[7] = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128);
y128p[8] = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128);
y128p[9] = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128);
y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128);
y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128);
y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128);
y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128);
y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128);
y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128);
y128p+=16;
}
}
_mm_empty();
_m_empty();
#endif
}
// 256 x 3
void idft768(int16_t *input, int16_t *output, unsigned char scale)
{
int i,i2,j;
uint32_t tmp[3][256]__attribute__((aligned(32)));
uint32_t tmpo[3][256] __attribute__((aligned(32)));
simd_q15_t *y128p=(simd_q15_t*)output;
simd_q15_t ONE_OVER_SQRT3_Q15_128 = set1_int16(ONE_OVER_SQRT3_Q15);
for (i=0,j=0; i<256; i++) {
tmp[0][i] = ((uint32_t *)input)[j++];
tmp[1][i] = ((uint32_t *)input)[j++];
tmp[2][i] = ((uint32_t *)input)[j++];
}
idft256((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1);
idft256((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
idft256((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
for (i=0,i2=0; i<512; i+=8,i2+=4) {
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+512+i),(simd_q15_t*)(output+1024+i),
(simd_q15_t*)(twa768+i),(simd_q15_t*)(twb768+i));
}
if (scale==1) {
for (i=0; i<12; i++) {
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
y128p[1] = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128);
y128p[2] = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128);
y128p[3] = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128);
y128p[4] = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128);
y128p[5] = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128);
y128p[6] = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128);
y128p[7] = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128);
y128p[8] = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128);
y128p[9] = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128);
y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128);
y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128);
y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128);
y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128);
y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128);
y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128);
y128p+=16;
}
}
_mm_empty();
_m_empty();
}
...
...
openair1/PHY/TOOLS/tools_defs.h
View file @
865fdb98
...
...
@@ -263,6 +263,7 @@ void idft64(int16_t *x,int16_t *y,uint8_t scale_flag);
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft768
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
...
...
@@ -323,14 +324,14 @@ adftfunc_t dft_ftab[]={
#endif
typedef
enum
idft_size_idx
{
IDFT_128
,
IDFT_256
,
IDFT_512
,
IDFT_1024
,
IDFT_1536
,
IDFT_2048
,
IDFT_3072
,
IDFT_4096
,
IDFT_128
,
IDFT_256
,
IDFT_512
,
IDFT_
768
,
IDFT_
1024
,
IDFT_1536
,
IDFT_2048
,
IDFT_3072
,
IDFT_4096
,
IDFT_6144
,
IDFT_8192
,
IDFT_9216
,
IDFT_12288
,
IDFT_18432
,
IDFT_24576
,
IDFT_36864
,
IDFT_49152
,
IDFT_73728
,
IDFT_98304
,
IDFT_SIZE_IDXTABLESIZE
}
idft_size_idx_t
;
#ifdef OAIDFTS_MAIN
aidftfunc_t
idft_ftab
[]
=
{
idft128
,
idft256
,
idft512
,
idft1024
,
idft1536
,
idft2048
,
idft3072
,
idft4096
,
idft128
,
idft256
,
idft512
,
idft
768
,
idft
1024
,
idft1536
,
idft2048
,
idft3072
,
idft4096
,
idft6144
,
idft8192
,
idft9216
,
idft12288
,
idft18432
,
idft24576
,
idft36864
,
idft49152
,
idft73728
,
idft98304
};
...
...
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