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
1e39dd77
Commit
1e39dd77
authored
Aug 13, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix physical simulators
parent
8e56e14d
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
51 deletions
+57
-51
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+40
-39
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-0
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+1
-0
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+2
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+10
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-9
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+0
-1
No files found.
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
1e39dd77
...
@@ -460,6 +460,7 @@ int main(int argc, char **argv)
...
@@ -460,6 +460,7 @@ int main(int argc, char **argv)
rel15
->
mcsIndex
[
0
]
=
Imcs
;
rel15
->
mcsIndex
[
0
]
=
Imcs
;
rel15
->
numDmrsCdmGrpsNoData
=
1
;
rel15
->
numDmrsCdmGrpsNoData
=
1
;
rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
Tbslbrm
;
rel15
->
maintenance_parms_v3
.
tbSizeLbrmBytes
=
Tbslbrm
;
rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
,
rate
);
double
modulated_input
[
16
*
68
*
384
];
// [hna] 16 segments, 68*Zc
double
modulated_input
[
16
*
68
*
384
];
// [hna] 16 segments, 68*Zc
short
channel_output_fixed
[
16
*
68
*
384
];
short
channel_output_fixed
[
16
*
68
*
384
];
//unsigned char *estimated_output;
//unsigned char *estimated_output;
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
1e39dd77
...
@@ -318,6 +318,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
...
@@ -318,6 +318,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
sched_pdsch
->
rbStart
=
g_rbStart
;
sched_pdsch
->
rbStart
=
g_rbStart
;
sched_pdsch
->
rbSize
=
g_rbSize
;
sched_pdsch
->
rbSize
=
g_rbSize
;
sched_pdsch
->
mcs
=
g_mcsIndex
;
sched_pdsch
->
mcs
=
g_mcsIndex
;
sched_pdsch
->
nrOfLayers
=
g_nrOfLayers
;
/* the following might override the table that is mandated by RRC
/* the following might override the table that is mandated by RRC
* configuration */
* configuration */
current_BWP
->
mcsTableIdx
=
g_mcsTableIdx
;
current_BWP
->
mcsTableIdx
=
g_mcsTableIdx
;
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
1e39dd77
...
@@ -466,6 +466,7 @@ int main(int argc, char **argv)
...
@@ -466,6 +466,7 @@ int main(int argc, char **argv)
rel15_ul
->
nrOfLayers
=
Nl
;
rel15_ul
->
nrOfLayers
=
Nl
;
rel15_ul
->
target_code_rate
=
code_rate
;
rel15_ul
->
target_code_rate
=
code_rate
;
rel15_ul
->
pusch_data
.
tb_size
=
TBS
>>
3
;
rel15_ul
->
pusch_data
.
tb_size
=
TBS
>>
3
;
rel15_ul
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
,
code_rate
);
///////////////////////////////////////////////////
///////////////////////////////////////////////////
double
modulated_input
[
16
*
68
*
384
];
// [hna] 16 segments, 68*Zc
double
modulated_input
[
16
*
68
*
384
];
// [hna] 16 segments, 68*Zc
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
1e39dd77
...
@@ -1126,7 +1126,7 @@ int main(int argc, char **argv)
...
@@ -1126,7 +1126,7 @@ int main(int argc, char **argv)
pusch_pdu
->
bwp_size
=
abwp_size
;
pusch_pdu
->
bwp_size
=
abwp_size
;
}
}
pusch_pdu
->
pusch_data
.
tb_size
=
TBS
/
8
;
pusch_pdu
->
pusch_data
.
tb_size
=
TBS
>>
3
;
pusch_pdu
->
pdu_bit_map
=
pdu_bit_map
;
pusch_pdu
->
pdu_bit_map
=
pdu_bit_map
;
pusch_pdu
->
rnti
=
n_rnti
;
pusch_pdu
->
rnti
=
n_rnti
;
pusch_pdu
->
mcs_index
=
Imcs
;
pusch_pdu
->
mcs_index
=
Imcs
;
...
@@ -1158,6 +1158,7 @@ int main(int argc, char **argv)
...
@@ -1158,6 +1158,7 @@ int main(int argc, char **argv)
pusch_pdu
->
pusch_ptrs
.
ptrs_freq_density
=
ptrs_freq_density
;
pusch_pdu
->
pusch_ptrs
.
ptrs_freq_density
=
ptrs_freq_density
;
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
=
(
nfapi_nr_ptrs_ports_t
*
)
malloc
(
2
*
sizeof
(
nfapi_nr_ptrs_ports_t
));
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
=
(
nfapi_nr_ptrs_ports_t
*
)
malloc
(
2
*
sizeof
(
nfapi_nr_ptrs_ports_t
));
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
=
0
;
pusch_pdu
->
pusch_ptrs
.
ptrs_ports_list
[
0
].
ptrs_re_offset
=
0
;
pusch_pdu
->
maintenance_parms_v3
.
ldpcBaseGraph
=
get_BG
(
TBS
,
code_rate
);
// if transform precoding is enabled
// if transform precoding is enabled
if
(
transform_precoding
==
transformPrecoder_enabled
)
{
if
(
transform_precoding
==
transformPrecoder_enabled
)
{
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
1e39dd77
...
@@ -3498,6 +3498,15 @@ void csi_period_offset(NR_CSI_ReportConfig_t *csirep,
...
@@ -3498,6 +3498,15 @@ void csi_period_offset(NR_CSI_ReportConfig_t *csirep,
}
}
}
}
uint8_t
get_BG
(
uint32_t
A
,
uint16_t
R
)
{
float
code_rate
=
(
float
)
R
/
10240
.
0
f
;
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
code_rate
<=
0
.
6667
))
||
code_rate
<=
0
.
25
)
return
2
;
else
return
1
;
}
uint32_t
get_Y
(
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
)
{
uint32_t
get_Y
(
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
)
{
if
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
)
if
(
ss
->
searchSpaceType
->
present
==
NR_SearchSpace__searchSpaceType_PR_common
)
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
1e39dd77
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
uint32_t
get_Y
(
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
);
uint32_t
get_Y
(
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
);
uint8_t
get_BG
(
uint32_t
A
,
uint16_t
R
);
uint64_t
from_nrarfcn
(
int
nr_bandP
,
uint8_t
scs_index
,
uint32_t
dl_nrarfcn
);
uint64_t
from_nrarfcn
(
int
nr_bandP
,
uint8_t
scs_index
,
uint32_t
dl_nrarfcn
);
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
uint32_t
bw
);
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
uint32_t
bw
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
1e39dd77
...
@@ -212,6 +212,7 @@ uint8_t get_mcs_from_cqi(int mcs_table, int cqi_table, int cqi_idx)
...
@@ -212,6 +212,7 @@ uint8_t get_mcs_from_cqi(int mcs_table, int cqi_table, int cqi_idx)
return
9
;
return
9
;
}
}
void
set_dl_dmrs_ports
(
NR_pdsch_semi_static_t
*
ps
)
{
void
set_dl_dmrs_ports
(
NR_pdsch_semi_static_t
*
ps
)
{
//TODO first basic implementation of dmrs port selection
//TODO first basic implementation of dmrs port selection
...
@@ -248,15 +249,6 @@ void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps) {
...
@@ -248,15 +249,6 @@ void set_dl_dmrs_ports(NR_pdsch_semi_static_t *ps) {
}
}
}
}
uint8_t
get_BG
(
uint32_t
A
,
uint16_t
R
)
{
float
code_rate
=
(
float
)
R
/
10240
.
0
f
;
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
code_rate
<=
0
.
6667
))
||
code_rate
<=
0
.
25
)
return
2
;
else
return
1
;
}
NR_ControlResourceSet_t
*
get_coreset
(
gNB_MAC_INST
*
nrmac
,
NR_ControlResourceSet_t
*
get_coreset
(
gNB_MAC_INST
*
nrmac
,
NR_ServingCellConfigCommon_t
*
scc
,
NR_ServingCellConfigCommon_t
*
scc
,
void
*
bwp
,
void
*
bwp
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
1e39dd77
...
@@ -469,7 +469,6 @@ uint16_t set_pm_index(NR_UE_sched_ctrl_t *sched_ctrl,
...
@@ -469,7 +469,6 @@ uint16_t set_pm_index(NR_UE_sched_ctrl_t *sched_ctrl,
int
codebook_mode
);
int
codebook_mode
);
uint8_t
get_mcs_from_cqi
(
int
mcs_table
,
int
cqi_table
,
int
cqi_idx
);
uint8_t
get_mcs_from_cqi
(
int
mcs_table
,
int
cqi_table
,
int
cqi_idx
);
uint8_t
get_BG
(
uint32_t
A
,
uint16_t
R
);
uint8_t
set_dl_nrOfLayers
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
uint8_t
set_dl_nrOfLayers
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
const
int
get_dl_tda
(
const
gNB_MAC_INST
*
nrmac
,
const
NR_ServingCellConfigCommon_t
*
scc
,
int
slot
);
const
int
get_dl_tda
(
const
gNB_MAC_INST
*
nrmac
,
const
NR_ServingCellConfigCommon_t
*
scc
,
int
slot
);
...
...
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