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
canghaiwuhen
OpenXG-RAN
Commits
c45aa6ce
Commit
c45aa6ce
authored
May 14, 2020
by
OpInConnect_NCTU Terngyin/NY/GK/KM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dual thread with parameterized pressure test
parent
96009882
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
56 deletions
+86
-56
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+4
-4
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+4
-4
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+3
-1
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+75
-47
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
c45aa6ce
...
...
@@ -219,7 +219,7 @@ for (int q=0; q<thread_num_pdsch; q++){
gNB
->
multi_encoder
[
q
].
mod_symbs
=
mod_symbs
[
q
];
// ==Need to change ==***
}
//Get value for pressure
for
(
int
q
=
0
;
q
<
2
;
q
++
){
for
(
int
q
=
0
;
q
<
thread_num_pressure
;
q
++
){
//gNB->pressure_test[q].f = harq->f;
gNB
->
pressure_test
[
q
].
encoded_length
=
encoded_length
;
gNB
->
pressure_test
[
q
].
Nid
=
Nid
;
...
...
@@ -228,7 +228,7 @@ for (int q=0; q<2; q++){
gNB
->
pressure_test
[
q
].
Qm
=
Qm
;
//gNB->pressure_test[q].mod_symbs = mod_symbs[q]; // ==Need to change ==***
}
for
(
int
th
=
0
;
th
<
2
;
th
++
){
for
(
int
th
=
0
;
th
<
thread_num_pressure
;
th
++
){
for
(
int
q
=
0
;
q
<
NR_MAX_NB_CODEWORDS
;
q
++
){
gNB
->
pressure_test
[
th
].
mod_symbs_test
[
q
]
=
(
int32_t
*
)
malloc16
(
NR_MAX_PDSCH_ENCODED_LENGTH
*
sizeof
(
int32_t
));
}
...
...
@@ -258,14 +258,14 @@ clock_gettime(CLOCK_MONOTONIC, &start_ts); //timing
for
(
int
q
=
0
;
q
<
thread_num_pdsch
;
q
++
){
pthread_cond_signal
(
&
(
gNB
->
multi_encoder
[
q
].
cond_scr_mod
));
}
for
(
int
q
=
0
;
q
<
2
;
q
++
){
for
(
int
q
=
0
;
q
<
thread_num_pressure
;
q
++
){
pthread_cond_signal
(
&
(
gNB
->
pressure_test
[
q
].
cond_scr_mod
));
}
//Wait threads
for
(
int
q
=
0
;
q
<
thread_num_pdsch
;
q
++
){
while
(
gNB
->
multi_encoder
[
q
].
complete_scr_mod
!=
1
);
}
for
(
int
q
=
0
;
q
<
2
;
q
++
){
for
(
int
q
=
0
;
q
<
thread_num_pressure
;
q
++
){
while
(
gNB
->
pressure_test
[
q
].
complete_scr_mod
!=
1
);
}
clock_gettime
(
CLOCK_MONOTONIC
,
&
end_ts
);
//timing
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
c45aa6ce
...
...
@@ -455,14 +455,14 @@ int nr_dlsch_encoding(unsigned char *a, //harq->pdu => dlsch->harq_processes[har
// dlsch->harq_processes[i]->c[r] = (uint8_t*)malloc16(8448);
// dlsch->harq_processes[i]->d[r] = (uint8_t*)malloc16(68*384); //max size for coded output
// }
for
(
int
th
=
0
;
th
<
2
;
th
++
){
for
(
int
th
=
0
;
th
<
thread_num_pressure
;
th
++
){
for
(
int
j
=
0
;
j
<
MAX_NUM_NR_DLSCH_SEGMENTS
/
bw_scaling
;
j
++
){
// ==Why can not just be MAX_NUM_NR_DLSCH_SEGMENTS ==???
gNB
->
pressure_test
[
th
].
c_test
[
j
]
=
(
uint8_t
*
)
malloc16
(
8448
);
//(unsigned char *)malloc16(sizeof(unsigned char) * Kr/8);
gNB
->
pressure_test
[
th
].
d_test
[
j
]
=
(
uint8_t
*
)
malloc16
(
68
*
384
);
//(unsigned char *)malloc16(sizeof(unsigned char) * 68*384);
memcpy
(
gNB
->
pressure_test
[
th
].
c_test
[
j
],
dlsch
->
harq_processes
[
harq_pid
]
->
c
[
j
],
8448
);
// ==Check 8448 ==***
}
}
for
(
int
th
=
0
;
th
<
2
;
th
++
){
for
(
int
th
=
0
;
th
<
thread_num_pressure
;
th
++
){
//gNB->pressure_test[th].test_input = dlsch->harq_processes[harq_pid]->c;
//gNB->pressure_test[th].channel_input_optim = dlsch->harq_processes[harq_pid]->d;
gNB
->
pressure_test
[
th
].
Zc
=
*
Zc
;
...
...
@@ -492,13 +492,13 @@ int nr_dlsch_encoding(unsigned char *a, //harq->pdu => dlsch->harq_processes[har
for
(
int
th
=
0
;
th
<
thread_num_pdsch
;
th
++
){
pthread_cond_signal
(
&
(
gNB
->
multi_encoder
[
th
].
cond
));
}
for
(
int
th
=
0
;
th
<
2
;
th
++
){
for
(
int
th
=
0
;
th
<
thread_num_pressure
;
th
++
){
pthread_cond_signal
(
&
(
gNB
->
pressure_test
[
th
].
cond
));
}
for
(
int
th
=
0
;
th
<
thread_num_pdsch
;
th
++
){
while
(
gNB
->
multi_encoder
[
th
].
complete
!=
1
);
// ==check if multi_ldpc_enc done ==
}
for
(
int
th
=
0
;
th
<
2
;
th
++
){
for
(
int
th
=
0
;
th
<
thread_num_pressure
;
th
++
){
while
(
gNB
->
pressure_test
[
th
].
complete
!=
1
);
// ==check if multi_ldpc_enc done ==
}
clock_gettime
(
CLOCK_MONOTONIC
,
&
end_ts
);
//timing
...
...
openair1/PHY/defs_gNB.h
View file @
c45aa6ce
...
...
@@ -47,6 +47,8 @@
#define MAX_NUM_RU_PER_gNB MAX_NUM_RU_PER_eNB
#define thread_num_pdsch 2 // ==Change thread_num_pdsch here. Don't greater than 2 ==
#define thread_num_pressure 3 // ==Change thread_num_pressure here ==
#define check_time 0 // ==Change if you wnat to check time of threads ==
typedef
struct
{
/*params of thread*/
...
...
@@ -915,7 +917,7 @@ typedef struct PHY_VARS_gNB_s {
dlsch_encoding_ISIP
thread_encode
[
4
];
ldpc_encoding_ISIP
ldpc_encode
;
multi_ldpc_encoder_gNB
multi_encoder
[
thread_num_pdsch
];
multi_ldpc_encoder_gNB
pressure_test
[
2
];
multi_ldpc_encoder_gNB
pressure_test
[
thread_num_pressure
];
volatile
uint8_t
complete_encode
[
4
];
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
c45aa6ce
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