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
zzha zzha
OpenXG-RAN
Commits
77974857
Commit
77974857
authored
Feb 14, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for physical simulators
parent
f3126586
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
18 deletions
+19
-18
executables/nr-gnb.c
executables/nr-gnb.c
+2
-2
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+8
-6
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
+1
-1
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+0
-1
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+2
-2
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+5
-5
No files found.
executables/nr-gnb.c
View file @
77974857
...
...
@@ -178,13 +178,13 @@ void rx_func(void *param)
// disactivate PHY stats if UE is inactive for a given number of frames
for
(
int
i
=
0
;
i
<
MAX_MOBILES_PER_GNB
;
i
++
)
{
NR_gNB_PHY_STATS_t
*
stats
=
&
gNB
->
phy_stats
[
i
];
if
(
stats
->
active
&&
(((
frame_
r
x
-
stats
->
frame
+
1024
)
%
1024
)
>
NUMBER_FRAMES_PHY_UE_INACTIVE
))
if
(
stats
->
active
&&
(((
frame_
t
x
-
stats
->
frame
+
1024
)
%
1024
)
>
NUMBER_FRAMES_PHY_UE_INACTIVE
))
stats
->
active
=
false
;
}
// disactivate ULSCH structure if it is inactive for a given number of frames
for
(
int
i
=
0
;
i
<
gNB
->
max_nb_pusch
;
i
++
)
{
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
i
];
if
(
ulsch
->
active
&&
(((
frame_
r
x
-
ulsch
->
harq_process
->
frame
+
1024
)
%
1024
)
>
NUMBER_FRAMES_PHY_UE_INACTIVE
))
if
(
ulsch
->
active
&&
(((
frame_
t
x
-
ulsch
->
harq_process
->
frame
+
1024
)
%
1024
)
>
NUMBER_FRAMES_PHY_UE_INACTIVE
))
ulsch
->
active
=
false
;
}
...
...
openair1/PHY/INIT/nr_init.c
View file @
77974857
...
...
@@ -729,10 +729,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
pusch_vars
[
ULSCH_id
]
->
llr
=
(
int16_t
*
)
malloc16_clear
(
(
8
*
((
3
*
8
*
6144
)
+
12
))
*
sizeof
(
int16_t
)
);
// [hna] 6144 is LTE and (8*((3*8*6144)+12)) is not clear
pusch_vars
[
ULSCH_id
]
->
ul_valid_re_per_slot
=
(
int16_t
*
)
malloc16_clear
(
sizeof
(
int16_t
)
*
fp
->
symbols_per_slot
);
}
//ulsch_id
/*
for (ulsch_id=0; ulsch_id<NUMBER_OF_UE_MAX; ulsch_id++)
gNB->UE_stats_ptr[ulsch_id] = &gNB->UE_stats[ulsch_id];
*/
gNB
->
pusch_vars
=
pusch_vars
;
return
(
0
);
}
...
...
@@ -877,6 +875,7 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
llr
);
free_and_zero
(
pusch_vars
[
ULSCH_id
]);
}
//ULSCH_id
free
(
gNB
->
pusch_vars
);
}
//Adding nr_schedule_handler
...
...
@@ -1042,6 +1041,7 @@ void reset_DLSCH_struct(const PHY_VARS_gNB *gNB, processingData_L1tx_t *msg)
}
free
(
msg
->
dlsch
[
i
]);
}
free
(
msg
->
dlsch
);
}
void
init_nr_transport
(
PHY_VARS_gNB
*
gNB
)
...
...
@@ -1075,8 +1075,8 @@ void init_nr_transport(PHY_VARS_gNB *gNB)
else
buffer_ul_slots
=
(
nb_ul_slots_period
<
slot_ahead
)
?
nb_ul_slots_period
:
slot_ahead
;
gNB
->
max_nb_pucch
=
MAX_MOBILES_PER_GNB
*
buffer_ul_slots
;
gNB
->
max_nb_pusch
=
MAX_MOBILES_PER_GNB
*
buffer_ul_slots
;
gNB
->
max_nb_pucch
=
buffer_ul_slots
?
MAX_MOBILES_PER_GNB
*
buffer_ul_slots
:
1
;
gNB
->
max_nb_pusch
=
buffer_ul_slots
?
MAX_MOBILES_PER_GNB
*
buffer_ul_slots
:
1
;
gNB
->
max_nb_srs
=
buffer_ul_slots
<<
1
;
// assuming at most 2 SRS per slot
gNB
->
measurements
.
ulsch_measurements
=
(
ULSCH_MEASUREMENTS_gNB
*
)
malloc16
(
gNB
->
max_nb_pusch
*
sizeof
(
ULSCH_MEASUREMENTS_gNB
));
...
...
@@ -1125,4 +1125,6 @@ void reset_nr_transport(PHY_VARS_gNB *gNB)
for
(
int
i
=
0
;
i
<
gNB
->
max_nb_pusch
;
i
++
)
free_gNB_ulsch
(
&
gNB
->
ulsch
[
i
],
fp
->
N_RB_UL
);
free
(
gNB
->
ulsch
);
free
(
gNB
->
measurements
.
ulsch_measurements
);
}
openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c
View file @
77974857
...
...
@@ -212,7 +212,6 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq
{
int
rx_power_tot
=
0
;
int
rx_power
[
NB_ANTENNAS_RX
];
unsigned
short
rx_power_avg_dB
;
unsigned
short
rx_power_tot_dB
;
...
...
@@ -223,6 +222,7 @@ void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq
int
ch_offset
=
fp
->
ofdm_symbol_size
*
symbol
;
int
N_RB_UL
=
gNB
->
ulsch
[
ulsch_id
]
->
harq_process
->
ulsch_pdu
.
rb_size
;
int
rx_power
[
fp
->
nb_antennas_rx
];
for
(
int
aarx
=
0
;
aarx
<
fp
->
nb_antennas_rx
;
aarx
++
){
rx_power
[
aarx
]
=
0
;
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
77974857
...
...
@@ -430,7 +430,6 @@ int main(int argc, char **argv)
uint16_t
length_dmrs
=
1
;
uint8_t
Nl
=
1
;
uint8_t
rvidx
=
0
;
dlsch
->
rnti
=
1
;
/*dlsch->harq_processes[0]->mcs = Imcs;
dlsch->harq_processes[0]->rvidx = rvidx;*/
//printf("dlschsim harqid %d nb_rb %d, mscs %d\n",dlsch->harq_ids[subframe],
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
77974857
...
...
@@ -623,7 +623,7 @@ int main(int argc, char **argv)
if
(
format
==
0
){
nfapi_nr_uci_pucch_pdu_format_0_1_t
uci_pdu
;
nfapi_nr_pucch_pdu_t
pucch_pdu
;
gNB
->
uci
_stats
[
0
].
rnti
=
0x1234
;
gNB
->
phy
_stats
[
0
].
rnti
=
0x1234
;
pucch_pdu
.
rnti
=
0x1234
;
pucch_pdu
.
subcarrier_spacing
=
1
;
pucch_pdu
.
group_hop_flag
=
PUCCH_GroupHopping
&
1
;
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
77974857
...
...
@@ -456,7 +456,7 @@ int main(int argc, char **argv)
uint8_t
UE_id
=
0
;
NR_gNB_ULSCH_t
*
ulsch_gNB
=
gNB
->
ulsch
[
UE_id
];
NR_UL_gNB_HARQ_t
*
harq_process_gNB
=
ulsch_gNB
->
harq_process
es
[
harq_pid
]
;
NR_UL_gNB_HARQ_t
*
harq_process_gNB
=
ulsch_gNB
->
harq_process
;
nfapi_nr_pusch_pdu_t
*
rel15_ul
=
&
harq_process_gNB
->
ulsch_pdu
;
nr_phy_data_tx_t
phy_data
=
{
0
};
...
...
@@ -614,7 +614,7 @@ int main(int argc, char **argv)
errors_bit
=
0
;
for
(
i
=
0
;
i
<
TBS
;
i
++
)
{
estimated_output_bit
[
i
]
=
(
ulsch_gNB
->
harq_process
es
[
harq_pid
]
->
b
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
estimated_output_bit
[
i
]
=
(
ulsch_gNB
->
harq_process
->
b
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
test_input_bit
[
i
]
=
(
test_input
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
// Further correct for multiple segments
if
(
estimated_output_bit
[
i
]
!=
test_input_bit
[
i
])
{
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
77974857
...
...
@@ -754,7 +754,7 @@ int main(int argc, char **argv)
NR_gNB_ULSCH_t
*
ulsch_gNB
=
gNB
->
ulsch
[
UE_id
];
//nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &ulsch_gNB->harq_process
es[harq_pid]
->ulsch_pdu;
//nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &ulsch_gNB->harq_process->ulsch_pdu;
nfapi_nr_ul_tti_request_t
*
UL_tti_req
=
malloc
(
sizeof
(
*
UL_tti_req
));
NR_Sched_Rsp_t
*
Sched_INFO
=
malloc
(
sizeof
(
*
Sched_INFO
));
memset
((
void
*
)
Sched_INFO
,
0
,
sizeof
(
*
Sched_INFO
));
...
...
@@ -1477,7 +1477,7 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
TBS
;
i
++
)
{
estimated_output_bit
[
i
]
=
(
ulsch_gNB
->
harq_process
es
[
harq_pid
]
->
b
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
estimated_output_bit
[
i
]
=
(
ulsch_gNB
->
harq_process
->
b
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
test_input_bit
[
i
]
=
(
UE
->
ul_harq_processes
[
harq_pid
].
b
[
i
/
8
]
&
(
1
<<
(
i
&
7
)))
>>
(
i
&
7
);
if
(
estimated_output_bit
[
i
]
!=
test_input_bit
[
i
])
{
...
...
@@ -1489,12 +1489,12 @@ int main(int argc, char **argv)
if
(
n_trials
==
1
)
{
for
(
int
r
=
0
;
r
<
UE
->
ul_harq_processes
[
harq_pid
].
C
;
r
++
)
for
(
int
i
=
0
;
i
<
UE
->
ul_harq_processes
[
harq_pid
].
K
>>
3
;
i
++
)
{
if
((
UE
->
ul_harq_processes
[
harq_pid
].
c
[
r
][
i
]
^
ulsch_gNB
->
harq_process
es
[
harq_pid
]
->
c
[
r
][
i
])
!=
0
)
if
((
UE
->
ul_harq_processes
[
harq_pid
].
c
[
r
][
i
]
^
ulsch_gNB
->
harq_process
->
c
[
r
][
i
])
!=
0
)
printf
(
"************"
);
/*printf("r %d: in[%d] %x, out[%d] %x (%x)\n",r,
i,UE->ul_harq_processes[harq_pid].c[r][i],
i,ulsch_gNB->harq_process
es[harq_pid]
->c[r][i],
UE->ul_harq_processes[harq_pid].c[r][i]^ulsch_gNB->harq_process
es[harq_pid]
->c[r][i]);*/
i,ulsch_gNB->harq_process->c[r][i],
UE->ul_harq_processes[harq_pid].c[r][i]^ulsch_gNB->harq_process->c[r][i]);*/
}
}
if
(
errors_decoding
>
0
&&
error_flag
==
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