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
d631a32f
Commit
d631a32f
authored
Jul 02, 2018
by
Florian Kaltenberger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP
parent
58b676e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
openair1/PHY/CODING/TESTBENCH/polartest.c
openair1/PHY/CODING/TESTBENCH/polartest.c
+21
-12
No files found.
openair1/PHY/CODING/TESTBENCH/polartest.c
View file @
d631a32f
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h"
#include "SIMULATION/TOOLS/sim.h"
#include "SIMULATION/TOOLS/sim.h"
int
main
(
int
argc
,
char
*
argv
[])
{
int
main
(
int
argc
,
char
*
argv
[])
{
...
@@ -70,15 +71,23 @@ int main(int argc, char *argv[]) {
...
@@ -70,15 +71,23 @@ int main(int argc, char *argv[]) {
}
}
if
(
polarMessageType
==
0
)
{
//DCI
if
(
polarMessageType
==
0
)
{
//DCI
//testLength = ;
//testLength = ;
//coderLength = ;
//coderLength = ;
printf
(
"polartest for DCI not supported yet
\n
"
);
exit
(
-
1
);
}
else
if
(
polarMessageType
==
1
)
{
//PBCH
}
else
if
(
polarMessageType
==
1
)
{
//PBCH
testLength
=
NR_POLAR_PBCH_PAYLOAD_BITS
;
testLength
=
NR_POLAR_PBCH_PAYLOAD_BITS
;
coderLength
=
NR_POLAR_PBCH_E
;
coderLength
=
NR_POLAR_PBCH_E
;
printf
(
"running polartest for PBCH
\n
"
);
}
else
if
(
polarMessageType
==
2
)
{
//UCI
}
else
if
(
polarMessageType
==
2
)
{
//UCI
//testLength = ;
testLength
=
NR_POLAR_PUCCH_PAYLOAD_BITS
;
//coderLength = ;
coderLength
=
NR_POLAR_PUCCH_E
;
printf
(
"running polartest for UCI"
);
}
else
{
printf
(
"unsupported polarMessageType %d (0=DCI, 1=PBCH, 2=UCI)
\n
"
,
polarMessageType
);
exit
(
-
1
);
}
}
//Logging
//Logging
time_t
currentTime
;
time_t
currentTime
;
...
@@ -96,12 +105,12 @@ int main(int argc, char *argv[]) {
...
@@ -96,12 +105,12 @@ int main(int argc, char *argv[]) {
if
(
stat
(
folderName
,
&
folder
)
==
-
1
)
mkdir
(
folderName
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
if
(
stat
(
folderName
,
&
folder
)
==
-
1
)
mkdir
(
folderName
,
S_IRWXU
|
S_IRWXG
|
S_IRWXO
);
FILE
*
logFile
;
FILE
*
logFile
;
logFile
=
fopen
(
fileName
,
"w"
);
logFile
=
fopen
(
fileName
,
"w"
);
if
(
logFile
==
NULL
)
{
if
(
logFile
==
NULL
)
{
fprintf
(
stderr
,
"[polartest.c] Problem creating file %s with fopen
\n
"
,
fileName
);
fprintf
(
stderr
,
"[polartest.c] Problem creating file %s with fopen
\n
"
,
fileName
);
exit
(
-
1
);
exit
(
-
1
);
}
}
fprintf
(
logFile
,
",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]
\n
"
);
fprintf
(
logFile
,
",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]
\n
"
);
uint8_t
*
testInput
=
malloc
(
sizeof
(
uint8_t
)
*
testLength
);
//generate randomly
uint8_t
*
testInput
=
malloc
(
sizeof
(
uint8_t
)
*
testLength
);
//generate randomly
uint8_t
*
encoderOutput
=
malloc
(
sizeof
(
uint8_t
)
*
coderLength
);
uint8_t
*
encoderOutput
=
malloc
(
sizeof
(
uint8_t
)
*
coderLength
);
...
...
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