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
wangjie
OpenXG-RAN
Commits
f8f97a21
Commit
f8f97a21
authored
Oct 07, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implementation of table 7.4.1.5.3-1
parent
2a3306a1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
374 additions
and
1 deletion
+374
-1
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
+374
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_csi_rs.c
View file @
f8f97a21
...
@@ -27,7 +27,380 @@
...
@@ -27,7 +27,380 @@
int
nr_generate_csi_rs
(
uint32_t
**
gold_csi_rs
,
int
nr_generate_csi_rs
(
uint32_t
**
gold_csi_rs
,
int32_t
*
txdataF
,
int32_t
*
txdataF
,
NR_DL_FRAME_PARMS
frame_parms
,
NR_DL_FRAME_PARMS
frame_parms
,
nfapi_nr_c
onfig_request_t
config
)
nfapi_nr_c
si_rs_pdu_t
csi_params
)
{
{
uint16_t
b
=
csi_params
.
freq_domain
;
uint8_t
size
,
ports
,
kprime
,
lprime
,
i
;
uint8_t
j
[
16
],
k_n
[
6
],
koverline
[
16
],
loverline
[
16
];
int
found
=
0
;
uint8_t
fi
=
0
;
switch
(
csi_params
.
row
)
{
// implementation of table 7.4.1.5.3-1 of 38.211
// lprime and kprime are the max value of l' and k'
case
1
:
ports
=
1
;
kprime
=
0
;
lprime
=
0
;
size
=
3
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
;
found
++
;
}
else
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
0
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
0
]
+
i
<<
2
;
}
break
;
case
2
:
ports
=
1
;
kprime
=
0
;
lprime
=
0
;
size
=
1
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
;
found
++
;
}
else
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
0
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
0
];
}
break
;
case
3
:
ports
=
2
;
kprime
=
1
;
lprime
=
0
;
size
=
1
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
else
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
0
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
0
];
}
break
;
case
4
:
ports
=
4
;
kprime
=
1
;
lprime
=
0
;
size
=
2
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
2
;
found
++
;
}
else
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
0
]
+
i
<<
1
;
}
break
;
case
5
:
ports
=
4
;
kprime
=
1
;
lprime
=
0
;
size
=
2
;
while
(
found
<
1
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
else
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
+
i
;
koverline
[
i
]
=
k_n
[
0
];
}
break
;
case
6
:
ports
=
8
;
kprime
=
1
;
lprime
=
0
;
size
=
4
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
7
:
ports
=
8
;
kprime
=
1
;
lprime
=
0
;
size
=
4
;
while
(
found
<
2
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
+
i
>>
1
;
koverline
[
i
]
=
k_n
[
i
%
2
];
}
break
;
case
8
:
ports
=
8
;
kprime
=
1
;
lprime
=
1
;
size
=
2
;
while
(
found
<
2
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
9
:
ports
=
12
;
kprime
=
1
;
lprime
=
0
;
size
=
6
;
while
(
found
<
6
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
10
:
ports
=
12
;
kprime
=
1
;
lprime
=
1
;
size
=
3
;
while
(
found
<
3
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
}
case
11
:
ports
=
16
;
kprime
=
1
;
lprime
=
0
;
size
=
8
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
+
i
>>
2
;
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
}
case
12
:
ports
=
16
;
kprime
=
1
;
lprime
=
1
;
size
=
4
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
13
:
ports
=
24
;
kprime
=
1
;
lprime
=
0
;
size
=
12
;
while
(
found
<
3
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
if
(
i
<
6
)
loverline
[
i
]
=
csi_params
.
symb_l0
+
i
/
3
;
else
loverline
[
i
]
=
csi_params
.
symb_l1
+
i
/
9
;
koverline
[
i
]
=
k_n
[
i
%
3
];
}
break
;
case
14
:
ports
=
24
;
kprime
=
1
;
lprime
=
1
;
size
=
6
;
while
(
found
<
3
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
if
(
i
<
3
)
loverline
[
i
]
=
csi_params
.
symb_l0
;
else
loverline
[
i
]
=
csi_params
.
symb_l1
;
koverline
[
i
]
=
k_n
[
i
%
3
];
}
break
;
case
15
:
ports
=
24
;
kprime
=
1
;
lprime
=
3
;
size
=
3
;
while
(
found
<
3
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
case
16
:
ports
=
32
;
kprime
=
1
;
lprime
=
0
;
size
=
16
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
if
(
i
<
8
)
loverline
[
i
]
=
csi_params
.
symb_l0
+
i
>>
2
;
else
loverline
[
i
]
=
csi_params
.
symb_l1
+
i
>>
4
;
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
case
17
:
ports
=
32
;
kprime
=
1
;
lprime
=
1
;
size
=
8
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
if
(
i
<
4
)
loverline
[
i
]
=
csi_params
.
symb_l0
;
else
loverline
[
i
]
=
csi_params
.
symb_l1
;
koverline
[
i
]
=
k_n
[
i
%
4
];
}
break
;
case
18
:
ports
=
32
;
kprime
=
1
;
lprime
=
3
;
size
=
4
;
while
(
found
<
4
)
{
if
((
b
>>
fi
)
&
0x01
)
{
k_n
[
found
]
=
fi
<<
1
;
found
++
;
}
fi
++
;
}
for
(
i
=
0
;
i
<
size
;
i
++
)
{
j
[
i
]
=
i
;
loverline
[
i
]
=
csi_params
.
symb_l0
;
koverline
[
i
]
=
k_n
[
i
];
}
break
;
}
return
0
;
return
0
;
}
}
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