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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
df9cd171
Commit
df9cd171
authored
Apr 16, 2024
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove a useless copy and specific buffer for all UE UL payload
parent
74977924
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
31 deletions
+19
-31
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+4
-9
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
+1
-3
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+8
-10
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+1
-4
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+1
-1
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+3
-3
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
df9cd171
...
...
@@ -534,8 +534,7 @@ void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES],
}
for
(
int
i
=
0
;
i
<
number_of_processes
;
i
++
)
{
free_and_zero
(
harq_list
[
i
].
a
);
free_and_zero
(
harq_list
[
i
].
b
);
free_and_zero
(
harq_list
[
i
].
payload_AB
);
for
(
int
r
=
0
;
r
<
a_segments
;
r
++
)
{
free_and_zero
(
harq_list
[
i
].
c
[
r
]);
free_and_zero
(
harq_list
[
i
].
d
[
r
]);
...
...
@@ -598,13 +597,9 @@ void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCE
memset
(
harq_list
+
i
,
0
,
sizeof
(
NR_UL_UE_HARQ_t
));
harq_list
[
i
].
a
=
malloc16
(
ulsch_bytes
);
DevAssert
(
harq_list
[
i
].
a
);
bzero
(
harq_list
[
i
].
a
,
ulsch_bytes
);
harq_list
[
i
].
b
=
malloc16
(
ulsch_bytes
);
DevAssert
(
harq_list
[
i
].
b
);
bzero
(
harq_list
[
i
].
b
,
ulsch_bytes
);
harq_list
[
i
].
payload_AB
=
malloc16
(
ulsch_bytes
);
DevAssert
(
harq_list
[
i
].
payload_AB
);
bzero
(
harq_list
[
i
].
payload_AB
,
ulsch_bytes
);
harq_list
[
i
].
c
=
malloc16
(
a_segments
*
sizeof
(
uint8_t
*
));
harq_list
[
i
].
d
=
malloc16
(
a_segments
*
sizeof
(
uint16_t
*
));
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h
View file @
df9cd171
...
...
@@ -55,9 +55,7 @@ typedef struct {
/// Index of current HARQ round for this ULSCH
uint8_t
round
;
/// pointer to pdu from MAC interface (TS 36.212 V15.4.0, Sec 5.1 p. 8)
unsigned
char
*
a
;
/// Pointer to the payload + CRC
uint8_t
*
b
;
unsigned
char
*
payload_AB
;
/// Pointers to transport block segments
uint8_t
**
c
;
/// LDPC-code outputs
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
View file @
df9cd171
...
...
@@ -87,21 +87,19 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
int
B
;
if
(
A
>
NR_MAX_PDSCH_TBS
)
{
// Add 24-bit crc (polynomial A) to payload
crc
=
crc24a
(
harq_process
->
a
,
A
)
>>
8
;
harq_process
->
a
[
A
>>
3
]
=
((
uint8_t
*
)
&
crc
)[
2
];
harq_process
->
a
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
1
];
harq_process
->
a
[
2
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
crc
=
crc24a
(
harq_process
->
payload_AB
,
A
)
>>
8
;
harq_process
->
payload_AB
[
A
>>
3
]
=
((
uint8_t
*
)
&
crc
)[
2
];
harq_process
->
payload_AB
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
1
];
harq_process
->
payload_AB
[
2
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
B
=
A
+
24
;
AssertFatal
((
A
/
8
)
+
4
<=
max_payload_bytes
,
"A %d is too big (A/8+4 = %d > %d)
\n
"
,
A
,
(
A
/
8
)
+
4
,
max_payload_bytes
);
memcpy
(
harq_process
->
b
,
harq_process
->
a
,(
A
/
8
)
+
4
);
}
else
{
// Add 16-bit crc (polynomial A) to payload
crc
=
crc16
(
harq_process
->
a
,
A
)
>>
16
;
harq_process
->
a
[
A
>>
3
]
=
((
uint8_t
*
)
&
crc
)[
1
];
harq_process
->
a
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
crc
=
crc16
(
harq_process
->
payload_AB
,
A
)
>>
16
;
harq_process
->
payload_AB
[
A
>>
3
]
=
((
uint8_t
*
)
&
crc
)[
1
];
harq_process
->
payload_AB
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
B
=
A
+
16
;
AssertFatal
((
A
/
8
)
+
3
<=
max_payload_bytes
,
"A %d is too big (A/8+3 = %d > %d)
\n
"
,
A
,
(
A
/
8
)
+
3
,
max_payload_bytes
);
memcpy
(
harq_process
->
b
,
harq_process
->
a
,(
A
/
8
)
+
3
);
// using 3 bytes to mimic the case of 24 bit crc
}
///////////////////////// b---->| block segmentation |---->c /////////////////////////
...
...
@@ -110,7 +108,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_SEGMENTATION
,
VCD_FUNCTION_IN
);
start_meas
(
&
ue
->
ulsch_segmentation_stats
);
impp
.
Kb
=
nr_segmentation
(
harq_process
->
b
,
impp
.
Kb
=
nr_segmentation
(
harq_process
->
payload_AB
,
harq_process
->
c
,
B
,
&
harq_process
->
C
,
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
df9cd171
...
...
@@ -191,10 +191,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
mod_order
,
Nl
);
trace_NRpdu
(
DIRECTION_UPLINK
,
harq_process_ul_ue
->
a
,
tb_size
,
WS_C_RNTI
,
rnti
,
frame
,
slot
,
0
,
0
);
trace_NRpdu
(
DIRECTION_UPLINK
,
harq_process_ul_ue
->
payload_AB
,
tb_size
,
WS_C_RNTI
,
rnti
,
frame
,
slot
,
0
,
0
);
if
(
nr_ulsch_encoding
(
UE
,
ulsch_ue
,
frame_parms
,
harq_pid
,
tb_size
,
G
)
==
-
1
)
return
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
df9cd171
...
...
@@ -468,7 +468,7 @@ static void nr_ue_scheduled_response_ul(PHY_VARS_NR_UE *phy, fapi_nr_ul_config_r
ul_config
->
slot
,
pdu
->
pusch_config_pdu
.
tx_request_body
.
pdu_length
,
current_harq_pid
);
memcpy
(
harq_process_ul_ue
->
a
,
memcpy
(
harq_process_ul_ue
->
payload_AB
,
pdu
->
pusch_config_pdu
.
tx_request_body
.
pdu
,
pdu
->
pusch_config_pdu
.
tx_request_body
.
pdu_length
);
}
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
df9cd171
...
...
@@ -507,7 +507,7 @@ int main(int argc, char **argv)
ulsch_ue
->
pusch_pdu
.
target_code_rate
=
code_rate
;
ulsch_ue
->
pusch_pdu
.
qam_mod_order
=
mod_order
;
ulsch_ue
->
pusch_pdu
.
ldpcBaseGraph
=
get_BG
(
TBS
,
code_rate
);
unsigned
char
*
test_input
=
harq_process_ul_ue
->
a
;
unsigned
char
*
test_input
=
harq_process_ul_ue
->
payload_AB
;
///////////
////////////////////////////////////////////////////////////////////////////////////////////
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
df9cd171
...
...
@@ -1141,7 +1141,7 @@ int main(int argc, char *argv[])
}
for
(
int
i
=
0
;
i
<
(
TBS
/
8
);
i
++
)
UE
->
ul_harq_processes
[
harq_pid
].
a
[
i
]
=
i
&
0xff
;
UE
->
ul_harq_processes
[
harq_pid
].
payload_AB
[
i
]
=
i
&
0xff
;
if
(
input_fd
==
NULL
)
{
// set FAPI parameters for UE, put them in the scheduled response and call
...
...
@@ -1457,7 +1457,7 @@ int main(int argc, char *argv[])
for
(
i
=
0
;
i
<
TBS
;
i
++
)
{
uint8_t
estimated_output_bit
=
(
ulsch_gNB
->
harq_process
->
b
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
uint8_t
test_input_bit
=
(
UE
->
ul_harq_processes
[
harq_pid
].
b
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
uint8_t
test_input_bit
=
(
UE
->
ul_harq_processes
[
harq_pid
].
payload_AB
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
if
(
estimated_output_bit
!=
test_input_bit
)
{
/*if(errors_decoding == 0)
...
...
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