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
9dcade26
Commit
9dcade26
authored
Aug 09, 2018
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
generate sss tables
parent
e04b8241
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
80 deletions
+71
-80
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+2
-0
openair1/PHY/LTE_TRANSPORT/sss.h
openair1/PHY/LTE_TRANSPORT/sss.h
+0
-25
openair1/PHY/LTE_TRANSPORT/sss_gen.c
openair1/PHY/LTE_TRANSPORT/sss_gen.c
+68
-0
openair1/PHY/LTE_TRANSPORT/sss_gen.m
openair1/PHY/LTE_TRANSPORT/sss_gen.m
+0
-53
openair1/PHY/LTE_TRANSPORT/transport_extern.h
openair1/PHY/LTE_TRANSPORT/transport_extern.h
+1
-1
openair1/PHY/LTE_TRANSPORT/transport_vars.h
openair1/PHY/LTE_TRANSPORT/transport_vars.h
+0
-1
No files found.
cmake_targets/CMakeLists.txt
View file @
9dcade26
...
...
@@ -1108,6 +1108,7 @@ set(PHY_SRC
# actual source
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/pss.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/sss.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/sss_gen.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/pilots.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/pilots_mbsfn.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/dlsch_coding.c
...
...
@@ -1147,6 +1148,7 @@ set(PHY_SRC_RU
set
(
PHY_SRC_UE
# actual source
${
OPENAIR1_DIR
}
/PHY/LTE_UE_TRANSPORT/sss_ue.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/sss_gen.c
${
OPENAIR1_DIR
}
/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
${
OPENAIR1_DIR
}
/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c
${
OPENAIR1_DIR
}
/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c
...
...
openair1/PHY/LTE_TRANSPORT/sss.h
deleted
100644 → 0
View file @
e04b8241
This source diff could not be displayed because it is too large. You can
view the blob
instead.
openair1/PHY/LTE_TRANSPORT/sss_gen.c
0 → 100644
View file @
9dcade26
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <malloc.h>
#include <stdlib.h>
#include <math.h>
int16_t
*
d0_sss
;
int16_t
*
d5_sss
;
#define MyAssert(x) { if(!(x)) { printf("Error in table intialization: %s:%d\n",__FILE__,__LINE__); exit(1);}}
#define gen(table, formula) { \
int x[31]= {0}; \
x[4]=1; \
for(int i=0; i<26; i++) \
x[i+5]=formula; \
for (int i=0; i<31; i++) \
table[i]=1-2*x[i]; \
}
#define mod31(a) (a)%31
#define mod2(a) (a)%2
#define mod8(a) (a)%8
__attribute__
((
constructor
))
static
void
init_sss
(
void
)
{
MyAssert
(
0
==
posix_memalign
((
void
**
)
&
d0_sss
,
16
,
504
*
31
*
2
*
sizeof
(
*
d0_sss
)));
MyAssert
(
0
==
posix_memalign
((
void
**
)
&
d5_sss
,
16
,
504
*
31
*
2
*
sizeof
(
*
d5_sss
)));
int
s
[
31
];
gen
(
s
,
mod2
(
x
[
i
+
2
]
+
x
[
i
]));
int
z
[
31
];
gen
(
z
,
mod2
(
x
[
i
+
4
]
+
x
[
i
+
2
]
+
x
[
i
+
1
]
+
x
[
i
]));
int
c
[
31
];
gen
(
c
,
mod2
(
x
[
i
+
3
]
+
x
[
i
]));
for
(
int
Nid2
=
0
;
Nid2
<
3
;
Nid2
++
)
{
for
(
int
Nid1
=
0
;
Nid1
<
168
;
Nid1
++
)
{
int
qprime
=
Nid1
/
30
;
int
q
=
(
Nid1
+
(
qprime
*
(
qprime
+
1
))
/
2
)
/
30
;
int
mprime
=
Nid1
+
q
*
(
q
+
1
)
/
2
;
int
m0
=
mprime
%
31
;
int
m1
=
(
m0
+
mprime
/
31
+
1
)
%
31
;
int
rowIndex
=
(
Nid2
+
3
*
Nid1
)
*
31
*
2
;
for
(
int
i
=
0
;
i
<
31
;
i
++
)
{
d0_sss
[
rowIndex
+
i
*
2
]
=
s
[
mod31
(
i
+
m0
)]
*
c
[
mod31
(
i
+
Nid2
)];
d5_sss
[
rowIndex
+
i
*
2
]
=
s
[
mod31
(
i
+
m1
)]
*
c
[
mod31
(
i
+
Nid2
)];
d0_sss
[
rowIndex
+
i
*
2
+
1
]
=
s
[
mod31
(
i
+
m1
)]
*
c
[
mod31
(
i
+
Nid2
+
3
)]
*
z
[
mod31
(
i
+
mod8
(
m0
))];
d5_sss
[
rowIndex
+
i
*
2
+
1
]
=
s
[
mod31
(
i
+
m0
)]
*
c
[
mod31
(
i
+
Nid2
+
3
)]
*
z
[
mod31
(
i
+
mod8
(
m1
))];
}
}
}
}
#ifdef SSS_TABLES_TEST
void
main
()
{
printf
(
"int16_t d0_sss[504*62] = {"
);
for
(
int
i
=
0
;
i
<
504
*
62
;
i
++
)
printf
(
"%d,
\n
"
,
d0_sss
[
i
]);
printf
(
"};
\n\n
"
);
printf
(
"int16_t d5_sss[504*62] = {"
);
for
(
int
i
=
0
;
i
<
504
*
62
;
i
++
)
printf
(
"%d,
\n
"
,
d5_sss
[
i
]);
printf
(
"};
\n\n
"
);
}
#endif
openair1/PHY/LTE_TRANSPORT/sss_gen.m
deleted
100644 → 0
View file @
e04b8241
% generate s
x
=
zeros
(
1
,
30
);
x
(
1
:
5
)
=
[
0
0
0
0
1
];
for
i
=
1
:
26
x
(
i
+
5
)
=
rem
(
x
(
i
+
2
)
+
x
(
i
),
2
);
end
s
=
1
-
2
*
x
;
% generate z
x
=
zeros
(
1
,
30
);
x
(
1
:
5
)
=
[
0
0
0
0
1
];
for
i
=
1
:
26
x
(
i
+
5
)
=
rem
(
x
(
i
+
4
)
+
x
(
i
+
2
)
+
x
(
i
+
1
)
+
x
(
i
),
2
);
end
z
=
1
-
2
*
x
;
% generate c
x
=
zeros
(
1
,
30
);
x
(
1
:
5
)
=
[
0
0
0
0
1
];
for
i
=
1
:
26
x
(
i
+
5
)
=
rem
(
x
(
i
+
3
)
+
x
(
i
),
2
);
end
c
=
1
-
2
*
x
;
d0
=
zeros
(
504
,
62
);
d5
=
zeros
(
504
,
62
);
for
Nid2
=
0
:
2
,
c0
=
[
c
((
1
+
Nid2
)
:
end
)
c
(
1
:
Nid2
)];
c1
=
[
c
((
4
+
Nid2
)
:
end
)
c
(
1
:(
3
+
Nid2
))];
for
Nid1
=
0
:
167
,
qprime
=
floor
(
Nid1
/
30
);
q
=
floor
((
Nid1
+
qprime
*
(
qprime
+
1
)/
2
)/
30
);
mprime
=
Nid1
+
q
*
(
q
+
1
)/
2
;
m0
=
rem
(
mprime
,
31
);
m1
=
rem
(
m0
+
floor
(
mprime
/
31
)
+
1
,
31
);
sm0
=
[
s
((
1
+
m0
)
:
end
)
s
(
1
:
m0
)];
sm1
=
[
s
((
1
+
m1
)
:
end
)
s
(
1
:
m1
)];
m0mod8
=
rem
(
m0
,
8
);
m1mod8
=
rem
(
m1
,
8
);
zm0
=
[
z
((
1
+
m0mod8
)
:
end
)
z
(
1
:
m0mod8
)];
zm1
=
[
z
((
1
+
m1mod8
)
:
end
)
z
(
1
:
m1mod8
)];
d0
(
1
+
Nid2
+
(
3
*
Nid1
),
1
:
2
:
62
)
=
sm0
.*
c0
;
d5
(
1
+
Nid2
+
(
3
*
Nid1
),
1
:
2
:
62
)
=
sm1
.*
c0
;
d0
(
1
+
Nid2
+
(
3
*
Nid1
),
2
:
2
:
62
)
=
sm1
.*
c1
.*
zm0
;
d5
(
1
+
Nid2
+
(
3
*
Nid1
),
2
:
2
:
62
)
=
sm0
.*
c1
.*
zm1
;
end
end
fd
=
fopen
(
"sss.h"
,
"w"
);
fprintf
(
fd
,
"s16 d0_sss[504*62] = {"
);
fprintf
(
fd
,
"%d,"
,
d0
);
fprintf
(
fd
,
"};\n\n"
);
fprintf
(
fd
,
"s16 d5_sss[504*62] = {"
);
fprintf
(
fd
,
"%d,"
,
d5
);
fprintf
(
fd
,
"};\n\n"
);
fclose
(
fd
);
\ No newline at end of file
openair1/PHY/LTE_TRANSPORT/transport_extern.h
View file @
9dcade26
...
...
@@ -44,7 +44,7 @@ extern unsigned short scfdma_amps[26];
extern
char
dci_format_strings
[
15
][
13
];
extern
int16_t
d0_sss
[
504
*
62
],
d5_sss
[
504
*
62
]
;
extern
int16_t
*
d0_sss
,
*
d5_sss
;
extern
uint8_t
wACK
[
5
][
4
];
extern
int8_t
wACK_RX
[
5
][
4
];
...
...
openair1/PHY/LTE_TRANSPORT/transport_vars.h
View file @
9dcade26
...
...
@@ -21,7 +21,6 @@
#include "dlsch_tbs.h"
//#include "dlsch_tbs_full.h"
#include "sss.h"
unsigned
short
lte_cqi_eff1024
[
16
]
=
{
156
,
//-6, .15234
240
,
//-4 .234
...
...
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