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
9e75b806
Commit
9e75b806
authored
May 21, 2021
by
yihongzheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FPGA LDPC run more data OK, but SIB decode just success once
parent
a9d3c4ac
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
392 additions
and
20 deletions
+392
-20
common/utils/LOG/vcd_signal_dumper.c
common/utils/LOG/vcd_signal_dumper.c
+2
-1
common/utils/LOG/vcd_signal_dumper.h
common/utils/LOG/vcd_signal_dumper.h
+1
-1
common/utils/T/T_defs.h
common/utils/T/T_defs.h
+2
-1
common/utils/T/T_messages.txt
common/utils/T/T_messages.txt
+5
-1
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+65
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+4
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+313
-16
No files found.
common/utils/LOG/vcd_signal_dumper.c
View file @
9e75b806
...
@@ -545,7 +545,8 @@ const char* eurecomFunctionsNames[] = {
...
@@ -545,7 +545,8 @@ const char* eurecomFunctionsNames[] = {
"pss_synchro_nr"
,
"pss_synchro_nr"
,
"pss_search_time_nr"
,
"pss_search_time_nr"
,
"nr_initial_ue_sync"
,
"nr_initial_ue_sync"
,
"beam_switching_gpio"
"beam_switching_gpio"
,
"dl_encode_ldpc_fpga"
};
};
struct
vcd_module_s
vcd_modules
[]
=
{
struct
vcd_module_s
vcd_modules
[]
=
{
...
...
common/utils/LOG/vcd_signal_dumper.h
View file @
9e75b806
...
@@ -538,7 +538,7 @@ typedef enum {
...
@@ -538,7 +538,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR
,
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR
,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC
,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC
,
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO
,
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO
,
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DL_Encode_LPDC_FPGA
,
VCD_SIGNAL_DUMPER_FUNCTIONS_END
VCD_SIGNAL_DUMPER_FUNCTIONS_END
}
vcd_signal_dump_functions
;
}
vcd_signal_dump_functions
;
...
...
common/utils/T/T_defs.h
View file @
9e75b806
...
@@ -73,7 +73,8 @@ typedef struct {
...
@@ -73,7 +73,8 @@ typedef struct {
}
T_cache_t
;
}
T_cache_t
;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (273)
// #define VCD_NUM_FUNCTIONS (273)
#define VCD_NUM_FUNCTIONS (274)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (187)
#define VCD_NUM_VARIABLES (187)
...
...
common/utils/T/T_messages.txt
View file @
9e75b806
...
@@ -3560,4 +3560,8 @@ ID = VCD_FUNCTION_BEAM_SWITCHING_GPIO
...
@@ -3560,4 +3560,8 @@ ID = VCD_FUNCTION_BEAM_SWITCHING_GPIO
GROUP = ALL:VCD:ENB:VCD_FUNCTION
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
FORMAT = int,value
VCD_NAME = beam_switching_gpio
VCD_NAME = beam_switching_gpio
ID = VCD_FUNCTION_gNB_DL_Encode_LPDC_FPGA
DESC = VCD function gNB_DL_Encode_LPDC_FPGA
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = dl_encode_ldpc_fpga
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
9e75b806
...
@@ -77,6 +77,11 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
...
@@ -77,6 +77,11 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
uint32_t
*
out
)
{
uint32_t
*
out
)
{
uint32_t
x1
,
x2
,
s
=
0
,
in32
;
uint32_t
x1
,
x2
,
s
=
0
,
in32
;
static
uint32_t
count_data
=
0
;
uint8_t
*
u8data
;
uint32_t
*
pin32
;
uint32_t
byteSize
=
size
/
8
;
// AssertFatal(size%8==0,"ByteSize is not 8\n");
x2
=
(
n_RNTI
<<
15
)
+
(
q
<<
14
)
+
Nid
;
x2
=
(
n_RNTI
<<
15
)
+
(
q
<<
14
)
+
Nid
;
...
@@ -84,12 +89,45 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
...
@@ -84,12 +89,45 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
#if defined(__AVX2__)
#if defined(__AVX2__)
#if 0 //OAI自己的加扰代码
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
for (int i=0; i<((size>>5)+((size&0x1f) > 0 ? 1 : 0)); i++) {
in32=_mm256_movemask_epi8(_mm256_slli_epi16(((__m256i*)in)[i],7));
in32=_mm256_movemask_epi8(_mm256_slli_epi16(((__m256i*)in)[i],7));
out[i]=(in32^s);
out[i]=(in32^s);
// u8data = (uint8_t *)&in32;
// if(i < 10)
// {
// LOG_I(PHY, "in32 = %x, %02x, %02x, %02x, %02x\n",in32, u8data[0],u8data[1],u8data[2],u8data[3]);
// }
//printf("in[%d] %x => %x\n",i,in32,out[i]);
//printf("in[%d] %x => %x\n",i,in32,out[i]);
s=lte_gold_generic(&x1, &x2, 0);
s=lte_gold_generic(&x1, &x2, 0);
}
}
if(count_data == 9)
{
LOG_M("out1.m","out1", out, (byteSize+3)/4, 1, 9);
}
count_data++;
#endif
#if 1
//让FPGA输出的每个BYTE中的高低位bit翻转
//LOG_I(PHY, "in = %02x, %02x, %02x, %02x, %02x, %02x, %02x, %02x\n",in[0],in[1],in[2],in[3],in[4],in[5],in[6],in[7]);
Byte_Reverse_11
(
in
,
in
,
byteSize
);
pin32
=
(
uint32_t
*
)
in
;
// if(count_data == 9)
// {
// LOG_M("pin32.m","pin32", pin32, byteSize, 1, 9);
// }
//LOG_I(PHY, "in32 = %x, %x, %x, %x, %02x, %02x, %02x, %02x\n",pin32[0],pin32[1],pin32[2],pin32[3],in[0],in[1],in[2],in[3]);
for
(
int
j
=
0
;
j
<
(
byteSize
+
3
)
/
4
;
j
++
)
{
out
[
j
]
=
(
pin32
[
j
]
^
s
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
}
// if(count_data == 9)
// {
// LOG_M("out.m","out", out, (byteSize+3)/4, 1, 9);
// }
// count_data++;
#endif
#elif defined(__SSE4__)
#elif defined(__SSE4__)
_m128i
*
in128
;
_m128i
*
in128
;
for
(
int
i
=
0
;
i
<
((
size
>>
5
)
+
((
size
&
0x1f
)
>
0
?
1
:
0
));
i
++
)
{
for
(
int
i
=
0
;
i
<
((
size
>>
5
)
+
((
size
&
0x1f
)
>
0
?
1
:
0
));
i
++
)
{
...
@@ -99,6 +137,7 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
...
@@ -99,6 +137,7 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
out
[
i
]
=
(
in32
^
s
);
out
[
i
]
=
(
in32
^
s
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
}
}
log_dump
(
PHY
,
out
,
32
,
LOG_DUMP_CHAR
,
"__SSE4__out[] =
\n
"
);
//#elsif defined(__arm__) || defined(__aarch64)
//#elsif defined(__arm__) || defined(__aarch64)
#else
#else
...
@@ -108,6 +147,7 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
...
@@ -108,6 +147,7 @@ void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
Nid
,
Nid
,
n_RNTI
,
n_RNTI
,
out
);
out
);
LOG_I
(
PHY
,
"nr_pdsch_codeword_scrambling
\n
"
);
#endif
#endif
}
}
...
@@ -548,3 +588,28 @@ void clear_pdsch_stats(PHY_VARS_gNB *gNB) {
...
@@ -548,3 +588,28 @@ void clear_pdsch_stats(PHY_VARS_gNB *gNB) {
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_DLSCH_MAX
;
i
++
)
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_DLSCH_MAX
;
i
++
)
memset
((
void
*
)
&
gNB
->
dlsch_stats
[
i
],
0
,
sizeof
(
gNB
->
dlsch_stats
[
i
]));
memset
((
void
*
)
&
gNB
->
dlsch_stats
[
i
],
0
,
sizeof
(
gNB
->
dlsch_stats
[
i
]));
}
}
unsigned
char
Reverse8U
(
unsigned
char
x
)
{
x
=
(
x
&
0xaa
)
>>
1
|
(
x
&
0x55
)
<<
1
;
x
=
(
x
&
0xcc
)
>>
2
|
(
x
&
0x33
)
<<
2
;
x
=
(
x
&
0xf0
)
>>
4
|
(
x
&
0x0f
)
<<
4
;
return
x
;
}
void
Byte_Reverse_11
(
unsigned
char
*
Src
,
unsigned
char
*
Dest
,
int
Length
)
{
int
BlockSize
=
16
,
Block
=
Length
/
BlockSize
;
for
(
int
Y
=
0
;
Y
<
Block
*
BlockSize
;
Y
+=
BlockSize
)
{
__m128i
V
=
_mm_loadu_si128
((
__m128i
*
)(
Src
+
Y
));
V
=
_mm_or_si128
(
_mm_srli_epi16
(
_mm_and_si128
(
V
,
_mm_set1_epi8
(
0xaa
)),
1
),
_mm_slli_epi16
(
_mm_and_si128
(
V
,
_mm_set1_epi8
(
0x55
)),
1
));
V
=
_mm_or_si128
(
_mm_srli_epi16
(
_mm_and_si128
(
V
,
_mm_set1_epi8
(
0xcc
)),
2
),
_mm_slli_epi16
(
_mm_and_si128
(
V
,
_mm_set1_epi8
(
0x33
)),
2
));
V
=
_mm_or_si128
(
_mm_srli_epi16
(
_mm_and_si128
(
V
,
_mm_set1_epi8
(
0xf0
)),
4
),
_mm_slli_epi16
(
_mm_and_si128
(
V
,
_mm_set1_epi8
(
0x0f
)),
4
));
_mm_storeu_si128
((
__m128i
*
)(
Dest
+
Y
),
V
);
}
for
(
int
Y
=
Block
*
BlockSize
;
Y
<
Length
;
Y
++
)
{
Dest
[
Y
]
=
Reverse8U
(
Src
[
Y
]);
}
}
\ No newline at end of file
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
9e75b806
...
@@ -104,4 +104,8 @@ void clear_pdsch_stats(PHY_VARS_gNB *gNB);
...
@@ -104,4 +104,8 @@ void clear_pdsch_stats(PHY_VARS_gNB *gNB);
void
dl_find_iLS_lsIndex
(
unsigned
int
*
LDPC_lifting_size
,
uint32_t
*
iLS_out
,
uint32_t
*
lsIndex_out
);
void
dl_find_iLS_lsIndex
(
unsigned
int
*
LDPC_lifting_size
,
uint32_t
*
iLS_out
,
uint32_t
*
lsIndex_out
);
unsigned
char
Reverse8U
(
unsigned
char
x
);
void
Byte_Reverse_11
(
unsigned
char
*
Src
,
unsigned
char
*
Dest
,
int
Length
);
#endif
#endif
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
9e75b806
This diff is collapsed.
Click to expand it.
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