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
lizhongxiao
OpenXG-RAN
Commits
9a45167b
Commit
9a45167b
authored
Oct 30, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New mallocs for dlsch struct
parent
e7ff8337
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
19 deletions
+33
-19
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
+19
-8
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+4
-2
openair1/PHY/defs_nr_common.h
openair1/PHY/defs_nr_common.h
+1
-0
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+1
-1
targets/RT/USER/nr-gnb.c
targets/RT/USER/nr-gnb.c
+4
-4
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
9a45167b
...
...
@@ -194,8 +194,8 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
nfapi_nr_dl_config_dlsch_pdu_rel15_t
*
rel15
=
&
harq
->
dlsch_pdu
.
dlsch_pdu_rel15
;
nfapi_nr_dl_config_pdcch_parameters_rel15_t
pdcch_params
=
dci_alloc
.
pdcch_params
;
uint32_t
scrambled_output
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
5
];
int16_t
mod_symbs
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
]
;
int16_t
tx_layers
[
NR_MAX_NB_LAYERS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
]
;
int16_t
**
mod_symbs
=
(
int16_t
**
)
dlsch
.
mod_symbs
;
int16_t
**
tx_layers
=
(
int16_t
**
)
dlsch
.
txdataF
;
uint16_t
n_symbs
;
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
delta
;
uint16_t
TBS
=
rel15
->
transport_block_size
;
...
...
@@ -243,10 +243,10 @@ for (int i=0; i<n_symbs; i++) {
/// Layer mapping
nr_pdsch_layer_mapping
(
(
int16_t
**
)
mod_symbs
,
nr_pdsch_layer_mapping
(
mod_symbs
,
rel15
->
nb_layers
,
n_symbs
,
(
int16_t
**
)
tx_layers
);
tx_layers
);
/// Antenna port mapping
//to be moved to init phase potentially, for now tx_layers 1-8 are mapped on antenna ports 1000-1007
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
9a45167b
...
...
@@ -106,15 +106,21 @@ void free_gNB_dlsch(NR_gNB_DLSCH_t *dlsch)
}
NR_gNB_DLSCH_t
*
new_gNB_dlsch
(
unsigned
char
Kmimo
,
unsigned
char
Mdlharq
,
uint32_t
Nsoft
,
unsigned
char
N_RB_DL
,
uint8_t
abstraction_flag
,
NR_DL_FRAME_PARMS
*
frame_parms
)
NR_gNB_DLSCH_t
*
new_gNB_dlsch
(
unsigned
char
Kmimo
,
unsigned
char
Mdlharq
,
uint32_t
Nsoft
,
uint8_t
abstraction_flag
,
NR_DL_FRAME_PARMS
*
frame_parms
,
nfapi_nr_config_request_t
*
config
)
{
NR_gNB_DLSCH_t
*
dlsch
;
unsigned
char
exit_flag
=
0
,
i
,
r
,
aa
,
layer
;
int
re
;
unsigned
char
bw_scaling
=
1
;
uint16_t
N_RB
=
config
->
rf_config
.
dl_carrier_bandwidth
.
value
;
switch
(
N_RB
_DL
)
{
switch
(
N_RB
)
{
case
106
:
bw_scaling
=
2
;
...
...
@@ -134,19 +140,24 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_t
dlsch
->
Mlimit
=
4
;
dlsch
->
Nsoft
=
Nsoft
;
for
(
layer
=
0
;
layer
<
4
;
layer
++
)
{
dlsch
->
ue_spec_bf_weights
[
layer
]
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_tx
*
sizeof
(
int32_t
*
));
for
(
layer
=
0
;
layer
<
NR_MAX_NB_LAYERS
;
layer
++
)
{
dlsch
->
ue_spec_bf_weights
[
layer
]
=
(
int32_t
**
)
malloc16
(
config
->
rf_config
.
tx_antenna_ports
.
value
*
sizeof
(
int32_t
*
));
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
dlsch
->
ue_spec_bf_weights
[
layer
][
aa
]
=
(
int32_t
*
)
malloc16
(
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES
*
sizeof
(
int32_t
));
for
(
re
=
0
;
re
<
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES
;
re
++
)
{
dlsch
->
ue_spec_bf_weights
[
layer
][
aa
][
re
]
=
0x00007fff
;
}
}
dlsch
->
txdataF
[
layer
]
=
(
int32_t
*
)
malloc16
((
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
)
*
sizeof
(
int32_t
*
));
}
dlsch
->
calib_dl_ch_estimates
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_tx
*
sizeof
(
int32_t
*
));
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
int
q
=
0
;
q
<
NR_MAX_NB_CODEWORDS
;
q
++
)
dlsch
->
mod_symbs
[
q
]
=
(
int32_t
*
)
malloc16
((
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
)
*
sizeof
(
int32_t
*
));
dlsch
->
calib_dl_ch_estimates
=
(
int32_t
**
)
malloc16
(
config
->
rf_config
.
tx_antenna_ports
.
value
*
sizeof
(
int32_t
*
));
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
dlsch
->
calib_dl_ch_estimates
[
aa
]
=
(
int32_t
*
)
malloc16
(
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES
*
sizeof
(
int32_t
));
}
...
...
@@ -158,7 +169,7 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_t
for
(
i
=
0
;
i
<
Mdlharq
;
i
++
)
{
dlsch
->
harq_processes
[
i
]
=
(
NR_DL_gNB_HARQ_t
*
)
malloc16
(
sizeof
(
NR_DL_gNB_HARQ_t
));
LOG_T
(
PHY
,
"Required mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p
\n
"
,
MAX_NR_
U
LSCH_PAYLOAD_BYTES
/
bw_scaling
,
bw_scaling
,
i
,
dlsch
->
harq_processes
[
i
]);
MAX_NR_
D
LSCH_PAYLOAD_BYTES
/
bw_scaling
,
bw_scaling
,
i
,
dlsch
->
harq_processes
[
i
]);
if
(
dlsch
->
harq_processes
[
i
])
{
bzero
(
dlsch
->
harq_processes
[
i
],
sizeof
(
NR_DL_gNB_HARQ_t
));
...
...
openair1/PHY/defs_gNB.h
View file @
9a45167b
...
...
@@ -105,9 +105,11 @@ typedef struct {
typedef
struct
{
/// Pointers to 16 HARQ processes for the DLSCH
NR_DL_gNB_HARQ_t
*
harq_processes
[
16
];
NR_DL_gNB_HARQ_t
*
harq_processes
[
NR_MAX_NB_HARQ_PROCESSES
];
/// TX buffers for UE-spec transmission (antenna ports 5 or 7..14, prior to precoding)
int32_t
*
txdataF
[
8
];
int32_t
*
txdataF
[
NR_MAX_NB_LAYERS
];
/// Modulated symbols buffer
int32_t
*
mod_symbs
[
NR_MAX_NB_CODEWORDS
];
/// beamforming weights for UE-spec transmission (antenna ports 5 or 7..14), for each codeword, maximum 4 layers?
int32_t
**
ue_spec_bf_weights
[
4
];
/// dl channel estimates (estimated from ul channel estimates)
...
...
openair1/PHY/defs_nr_common.h
View file @
9a45167b
...
...
@@ -88,6 +88,7 @@
#define NR_MAX_NB_RBG 18
#define NR_MAX_NB_LAYERS 8
#define NR_MAX_NB_CODEWORDS 2
#define NR_MAX_NB_HARQ_PROCESSES 16
#define NR_MAX_PDSCH_ENCODED_LENGTH 950984
typedef
enum
{
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
9a45167b
...
...
@@ -405,7 +405,7 @@ int main(int argc, char **argv)
for
(
int
k
=
0
;
k
<
2
;
k
++
)
{
// Create transport channel structures for 2 transport blocks (MIMO)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
gNB
->
dlsch
[
k
][
i
]
=
new_gNB_dlsch
(
Kmimo
,
8
,
Nsoft
,
N_RB_DL
,
0
,
&
gNB
->
frame_parms
);
gNB
->
dlsch
[
k
][
i
]
=
new_gNB_dlsch
(
Kmimo
,
8
,
Nsoft
,
0
,
frame_parms
,
gNB_config
);
if
(
!
gNB
->
dlsch
[
k
][
i
])
{
printf
(
"Can't get eNB dlsch structures
\n
"
);
...
...
targets/RT/USER/nr-gnb.c
View file @
9a45167b
...
...
@@ -755,7 +755,7 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
for
(
i
=
0
;
i
<
NUMBER_OF_UE_MAX
;
i
++
)
{
LOG_I
(
PHY
,
"Allocating Transport Channel Buffers for DLSCH, UE %d
\n
"
,
i
);
for
(
j
=
0
;
j
<
2
;
j
++
)
{
gNB
->
dlsch
[
i
][
j
]
=
new_gNB_dlsch
(
1
,
16
,
NSOFT
,
cfg
->
rf_config
.
dl_carrier_bandwidth
.
value
,
0
,
fp
);
gNB
->
dlsch
[
i
][
j
]
=
new_gNB_dlsch
(
1
,
16
,
NSOFT
,
cfg
->
rf_config
.
dl_carrier_bandwidth
.
value
,
0
,
cfg
);
if
(
!
gNB
->
dlsch
[
i
][
j
])
{
LOG_E
(
PHY
,
"Can't get gNB dlsch structures for UE %d
\n
"
,
i
);
exit
(
-
1
);
...
...
@@ -784,11 +784,11 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
LOG_E(PHY,"Can't get gNB ulsch structures\n");
exit(-1);
}*/
gNB
->
dlsch_SI
=
new_gNB_dlsch
(
1
,
8
,
NSOFT
,
fp
->
N_RB_DL
,
0
,
fp
);
gNB
->
dlsch_SI
=
new_gNB_dlsch
(
1
,
8
,
NSOFT
,
0
,
fp
,
cfg
);
LOG_D
(
PHY
,
"gNB %d.%d : SI %p
\n
"
,
gNB
->
Mod_id
,
gNB
->
CC_id
,
gNB
->
dlsch_SI
);
gNB
->
dlsch_ra
=
new_gNB_dlsch
(
1
,
8
,
NSOFT
,
fp
->
N_RB_DL
,
0
,
fp
);
gNB
->
dlsch_ra
=
new_gNB_dlsch
(
1
,
8
,
NSOFT
,
0
,
fp
,
cfg
);
LOG_D
(
PHY
,
"gNB %d.%d : RA %p
\n
"
,
gNB
->
Mod_id
,
gNB
->
CC_id
,
gNB
->
dlsch_ra
);
gNB
->
dlsch_MCH
=
new_gNB_dlsch
(
1
,
8
,
NSOFT
,
fp
->
N_RB_DL
,
0
,
fp
);
gNB
->
dlsch_MCH
=
new_gNB_dlsch
(
1
,
8
,
NSOFT
,
0
,
fp
,
cfg
);
LOG_D
(
PHY
,
"gNB %d.%d : MCH %p
\n
"
,
gNB
->
Mod_id
,
gNB
->
CC_id
,
gNB
->
dlsch_MCH
);
...
...
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