Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
lizhongxiao
OpenXG UE
Commits
cbd32fdd
Commit
cbd32fdd
authored
Nov 09, 2021
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes in dlschsim, still doesn't work :-(
parent
f2d9a2db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
12 deletions
+27
-12
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+3
-5
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+24
-7
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
cbd32fdd
...
...
@@ -254,7 +254,7 @@ void ldpc8blocks( void *p) {
#ifdef DEBUG_DLSCH_CODING
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output ratematching e[%d]= %d r_offset %u
\n
"
,
i
,
harq
->
e
[
i
+
r_offset
],
r_offset
);
printf
(
"output ratematching e[%d]= %d r_offset %u
\n
"
,
i
,
e
[
i
],
r_offset
);
#endif
nr_interleaving_ldpc
(
E
,
...
...
@@ -266,8 +266,6 @@ void ldpc8blocks( void *p) {
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output interleaving f[%d]= %d r_offset %u
\n
"
,
i
,
impp
->
output
[
i
+
r_offset
],
r_offset
);
if
(
r
==
impp
->
n_segments
-
1
)
write_output
(
"enc_output.m"
,
"enc"
,
impp
->
output
,
G
,
1
,
4
);
#endif
r_offset
+=
E
;
...
...
@@ -370,11 +368,11 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
//d_tmp[r] = &harq->d[r][0];
//channel_input[r] = &harq->d[r][0];
#ifdef DEBUG_DLSCH_CODING
LOG_D
(
PHY
,
"Encoder: B %d F %d
\n
"
,
harq
->
B
,
impp
->
F
);
LOG_D
(
PHY
,
"Encoder: B %d F %d
\n
"
,
harq
->
B
,
impp
.
F
);
LOG_D
(
PHY
,
"start ldpc encoder segment %d/%d
\n
"
,
r
,
impp
.
n_segments
);
LOG_D
(
PHY
,
"input %d %d %d %d %d
\n
"
,
harq
->
c
[
r
][
0
],
harq
->
c
[
r
][
1
],
harq
->
c
[
r
][
2
],
harq
->
c
[
r
][
3
],
harq
->
c
[
r
][
4
]);
for
(
int
cnt
=
0
;
cnt
<
22
*
(
*
Zc
)
/
8
;
cnt
++
)
{
for
(
int
cnt
=
0
;
cnt
<
22
*
(
*
impp
.
Zc
)
/
8
;
cnt
++
)
{
LOG_D
(
PHY
,
"%d "
,
harq
->
c
[
r
][
cnt
]);
}
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
cbd32fdd
...
...
@@ -68,6 +68,7 @@ uint16_t n_rnti = 0x1234;
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
void
init_downlink_harq_status
(
NR_DL_UE_HARQ_t
*
dl_harq
)
{}
void
processSlotTX
(
void
*
arg
)
{}
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -116,8 +117,10 @@ int main(int argc, char **argv)
uint8_t
Imcs
=
9
;
uint8_t
mcs_table
=
0
;
double
DS_TDL
=
.
03
;
cpuf
=
get_cpu_freq_GHz
();
cpuf
=
get_cpu_freq_GHz
();
char
gNBthreads
[
128
]
=
"n"
;
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[NR_DLSCHSIM] Error, configuration module init failed
\n
"
);
}
...
...
@@ -426,9 +429,22 @@ int main(int argc, char **argv)
UE
->
dlsch_SI
[
0
]
=
new_nr_ue_dlsch
(
1
,
1
,
Nsoft
,
5
,
N_RB_DL
,
0
);
UE
->
dlsch_ra
[
0
]
=
new_nr_ue_dlsch
(
1
,
1
,
Nsoft
,
5
,
N_RB_DL
,
0
);
unsigned
char
harq_pid
=
0
;
//dlsch->harq_ids[subframe];
processingData_L1tx_t
msgDataTx
;
init_DLSCH_struct
(
gNB
,
&
msgDataTx
);
NR_gNB_DLSCH_t
*
dlsch
=
msgDataTx
.
dlsch
[
0
][
0
];
gNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
initTpool
(
gNBthreads
,
gNB
->
threadPool
,
true
);
gNB
->
resp_L1_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_L1_tx
);
// we create 2 threads for L1 tx processing
notifiedFIFO_elt_t
*
msgL1Tx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1tx_t
),
0
,
gNB
->
resp_L1_tx
,
processSlotTX
);
processingData_L1tx_t
*
msgDataTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
msgL1Tx
);
init_DLSCH_struct
(
gNB
,
msgDataTx
);
msgDataTx
->
slot
=
slot
;
msgDataTx
->
frame
=
frame
;
memset
(
msgDataTx
->
ssb
,
0
,
64
*
sizeof
(
NR_gNB_SSB_t
));
reset_meas
(
&
msgDataTx
->
phy_proc_tx
);
gNB
->
phy_proc_tx_0
=
&
msgDataTx
->
phy_proc_tx
;
pushTpool
(
gNB
->
threadPool
,
msgL1Tx
);
NR_gNB_DLSCH_t
*
dlsch
=
msgDataTx
->
dlsch
[
0
][
0
];
nfapi_nr_dl_tti_pdsch_pdu_rel15_t
*
rel15
=
&
dlsch
->
harq_process
.
pdsch_pdu
.
pdsch_pdu_rel15
;
//time_stats_t *rm_stats, *te_stats, *i_stats;
uint8_t
is_crnti
=
0
,
llr8_flag
=
0
;
...
...
@@ -501,10 +517,11 @@ int main(int argc, char **argv)
/*for (int i=0; i<TBS/8; i++)
printf("test input[%d]=%d \n",i,test_input[i]);*/
//printf("crc32: [0]->0x%08x\n",crc24c(test_input, 32));
// generate signal
unsigned
char
output
[
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
]
__attribute__
((
aligned
(
32
)));
bzero
(
output
,
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
);
unsigned
char
output
[
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
]
__attribute__
((
aligned
(
32
)));
bzero
(
output
,
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
);
if
(
input_fd
==
NULL
)
{
nr_dlsch_encoding
(
gNB
,
test_input
,
frame
,
slot
,
dlsch
,
frame_parms
,
output
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
...
...
@@ -640,7 +657,7 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
printf
(
"gNB %d
\n
"
,
i
);
free_gNB_dlsch
(
&
(
msgDataTx
.
dlsch
[
0
][
i
]),
N_RB_DL
);
free_gNB_dlsch
(
&
(
msgDataTx
->
dlsch
[
0
][
i
]),
N_RB_DL
);
printf
(
"UE %d
\n
"
,
i
);
free_nr_ue_dlsch
(
&
(
UE
->
dlsch
[
0
][
0
][
i
]),
N_RB_DL
);
}
...
...
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