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
spbro
OpenXG-RAN
Commits
ad96697d
Commit
ad96697d
authored
Oct 03, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common function for CSI-RS mapping parameters
parent
e15fa14c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
393 additions
and
386 deletions
+393
-386
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
+26
-386
openair1/PHY/nr_phy_common/inc/nr_phy_common.h
openair1/PHY/nr_phy_common/inc/nr_phy_common.h
+10
-0
openair1/PHY/nr_phy_common/src/nr_phy_common.c
openair1/PHY/nr_phy_common/src/nr_phy_common.c
+357
-0
No files found.
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
View file @
ad96697d
This diff is collapsed.
Click to expand it.
openair1/PHY/nr_phy_common/inc/nr_phy_common.h
View file @
ad96697d
...
...
@@ -24,6 +24,16 @@
#include "PHY/impl_defs_top.h"
#include "PHY/TOOLS/tools_defs.h"
typedef
struct
{
int
size
;
int
ports
;
int
kprime
;
int
lprime
;
int
j
[
16
];
int
koverline
[
16
];
int
loverline
[
16
];
}
csi_mapping_parms_t
;
csi_mapping_parms_t
get_csi_mapping_parms
(
int
row
,
int
b
,
int
l0
,
int
l1
);
void
nr_qpsk_llr
(
int32_t
*
rxdataF_comp
,
int16_t
*
llr
,
uint32_t
nb_re
);
void
nr_16qam_llr
(
int32_t
*
rxdataF_comp
,
int32_t
*
ch_mag_in
,
int16_t
*
llr
,
uint32_t
nb_re
);
void
nr_64qam_llr
(
int32_t
*
rxdataF_comp
,
int32_t
*
ch_mag
,
int32_t
*
ch_mag2
,
int16_t
*
llr
,
uint32_t
nb_re
);
...
...
openair1/PHY/nr_phy_common/src/nr_phy_common.c
View file @
ad96697d
...
...
@@ -354,6 +354,363 @@ void nr_256qam_llr(int32_t *rxdataF_comp, int32_t *ch_mag, int32_t *ch_mag2, int
simde_mm_empty
();
}
csi_mapping_parms_t
get_csi_mapping_parms
(
int
row
,
int
b
,
int
l0
,
int
l1
)
{
AssertFatal
(
b
!=
0
,
"Invalid CSI frequency domain mapping: no bit selected in bitmap
\n
"
);
csi_mapping_parms_t
csi_parms
=
{
0
};
int
found
=
0
;
int
fi
=
0
;
int
k_n
[
6
];
// implementation of table 7.4.1.5.3-1 of 38.211
// lprime and kprime are the max value of l' and k'
switch
(
row
)
{
case
1
:
csi_parms
.
ports
=
1
;
csi_parms
.
kprime
=
0
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
3
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
;
found
++
;
}
else
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
0
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
0
]
+
(
i
<<
2
);
}
break
;
case
2
:
csi_parms
.
ports
=
1
;
csi_parms
.
kprime
=
0
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
1
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
;
found
++
;
}
else
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
0
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
0
];
}
break
;
case
3
:
csi_parms
.
ports
=
2
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
1
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
else
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
0
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
0
];
}
break
;
case
4
:
csi_parms
.
ports
=
4
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
2
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
2
;
found
++
;
}
else
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
0
]
+
(
i
<<
1
);
}
break
;
case
5
:
csi_parms
.
ports
=
4
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
2
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
else
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
+
i
;
csi_parms
.
koverline
[
i
]
=
k_n
[
0
];
}
break
;
case
6
:
csi_parms
.
ports
=
8
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
4
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
7
:
csi_parms
.
ports
=
8
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
4
;
while
(
found
<
2
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
+
(
i
>>
1
);
csi_parms
.
koverline
[
i
]
=
k_n
[
i
%
2
];
}
break
;
case
8
:
csi_parms
.
ports
=
8
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
1
;
csi_parms
.
size
=
2
;
while
(
found
<
2
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
9
:
csi_parms
.
ports
=
12
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
6
;
while
(
found
<
6
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
10
:
csi_parms
.
ports
=
12
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
1
;
csi_parms
.
size
=
3
;
while
(
found
<
3
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
11
:
csi_parms
.
ports
=
16
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
8
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
+
(
i
>>
2
);
csi_parms
.
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
case
12
:
csi_parms
.
ports
=
16
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
1
;
csi_parms
.
size
=
4
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
13
:
csi_parms
.
ports
=
24
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
12
;
while
(
found
<
3
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
if
(
i
<
6
)
csi_parms
.
loverline
[
i
]
=
l0
+
i
/
3
;
else
csi_parms
.
loverline
[
i
]
=
l1
+
i
/
9
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
%
3
];
}
break
;
case
14
:
csi_parms
.
ports
=
24
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
1
;
csi_parms
.
size
=
6
;
while
(
found
<
3
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
if
(
i
<
3
)
csi_parms
.
loverline
[
i
]
=
l0
;
else
csi_parms
.
loverline
[
i
]
=
l1
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
%
3
];
}
break
;
case
15
:
csi_parms
.
ports
=
24
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
3
;
csi_parms
.
size
=
3
;
while
(
found
<
3
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
16
:
csi_parms
.
ports
=
32
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
0
;
csi_parms
.
size
=
16
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
if
(
i
<
8
)
csi_parms
.
loverline
[
i
]
=
l0
+
(
i
>>
2
);
else
csi_parms
.
loverline
[
i
]
=
l1
+
(
i
/
12
);
csi_parms
.
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
case
17
:
csi_parms
.
ports
=
32
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
1
;
csi_parms
.
size
=
8
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
if
(
i
<
4
)
csi_parms
.
loverline
[
i
]
=
l0
;
else
csi_parms
.
loverline
[
i
]
=
l1
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
case
18
:
csi_parms
.
ports
=
32
;
csi_parms
.
kprime
=
1
;
csi_parms
.
lprime
=
3
;
csi_parms
.
size
=
4
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
int
i
=
0
;
i
<
csi_parms
.
size
;
i
++
)
{
csi_parms
.
j
[
i
]
=
i
;
csi_parms
.
loverline
[
i
]
=
l0
;
csi_parms
.
koverline
[
i
]
=
k_n
[
i
];
}
break
;
default:
AssertFatal
(
false
,
"Row %d is not valid for CSI Table 7.4.1.5.3-1
\n
"
,
row
);
}
return
csi_parms
;
}
void
freq2time
(
uint16_t
ofdm_symbol_size
,
int16_t
*
freq_signal
,
int16_t
*
time_signal
)
{
const
idft_size_idx_t
idft_size
=
get_idft
(
ofdm_symbol_size
);
...
...
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