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
promise
OpenXG-RAN
Commits
a536aa29
Commit
a536aa29
authored
Mar 26, 2019
by
Khalid Ahmed
Committed by
Thomas Schlichter
Jun 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing bugs
parent
bb4cf0df
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
28 deletions
+35
-28
openair1/PHY/NR_REFSIG/nr_gold.c
openair1/PHY/NR_REFSIG/nr_gold.c
+16
-20
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+4
-3
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
+1
-0
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+11
-3
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+2
-1
No files found.
openair1/PHY/NR_REFSIG/nr_gold.c
View file @
a536aa29
...
...
@@ -81,7 +81,7 @@ void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid)
{
uint32_t
x1
,
x2
;
uint8_t
reset
;
uint8_t
reset
,
q
;
NR_DL_FRAME_PARMS
*
fp
=
&
gNB
->
frame_parms
;
uint32_t
****
pdsch_dmrs
=
gNB
->
nr_gold_pdsch_dmrs
;
...
...
@@ -89,18 +89,17 @@ void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid)
uint8_t
n_scid
=
0
;
// again works only for 1_0
for
(
uint8_t
slot
=
0
;
slot
<
fp
->
slots_per_frame
;
slot
++
)
{
for
(
uint8_t
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
for
(
uint8_t
q
=
0
;
q
<
NR_MAX_NB_CODEWORDS
;
q
++
)
{
reset
=
1
;
x2
=
((
1
<<
17
)
*
(
fp
->
symbols_per_slot
*
slot
+
symb
+
1
)
*
((
N_n_scid
[
n_scid
]
<<
1
)
+
1
)
+
((
N_n_scid
[
n_scid
]
<<
1
)
+
n_scid
));
for
(
uint32_t
n
=
0
;
n
<
NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD
;
n
++
)
{
pdsch_dmrs
[
slot
][
symb
][
q
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
pdsch_dmrs
[
slot
][
symb
][
0
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
}
}
}
for
(
q
=
1
;
q
<
NR_MAX_NB_CODEWORDS
;
q
++
)
memcpy
(
pdsch_dmrs
[
slot
][
symb
][
q
],
pdsch_dmrs
[
slot
][
symb
][
0
],
sizeof
(
uint32_t
)
*
NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD
);
}
}
}
void
nr_init_pusch_dmrs
(
PHY_VARS_NR_UE
*
ue
,
uint16_t
*
N_n_scid
,
uint8_t
n_scid
)
...
...
@@ -115,19 +114,16 @@ void nr_init_pusch_dmrs(PHY_VARS_NR_UE* ue, uint16_t *N_n_scid, uint8_t n_scid)
for
(
symb
=
0
;
symb
<
fp
->
symbols_per_slot
;
symb
++
)
{
for
(
q
=
0
;
q
<
NR_MAX_NB_CODEWORDS
;
q
++
)
{
reset
=
1
;
x2
=
((
1
<<
17
)
*
(
fp
->
symbols_per_slot
*
slot
+
symb
+
1
)
*
((
N_n_scid
[
n_scid
]
<<
1
)
+
1
)
+
((
N_n_scid
[
n_scid
]
<<
1
)
+
n_scid
));
for
(
n
=
0
;
n
<
NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD
;
n
++
)
{
pusch_dmrs
[
slot
][
symb
][
q
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
reset
=
1
;
x2
=
((
1
<<
17
)
*
(
fp
->
symbols_per_slot
*
slot
+
symb
+
1
)
*
((
N_n_scid
[
n_scid
]
<<
1
)
+
1
)
+
((
N_n_scid
[
n_scid
]
<<
1
)
+
n_scid
));
}
for
(
n
=
0
;
n
<
NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD
;
n
++
)
{
pusch_dmrs
[
slot
][
symb
][
0
][
n
]
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
}
}
for
(
q
=
1
;
q
<
NR_MAX_NB_CODEWORDS
;
q
++
)
memcpy
(
pusch_dmrs
[
slot
][
symb
][
q
],
pusch_dmrs
[
slot
][
symb
][
0
],
sizeof
(
uint32_t
)
*
NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD
);
}
}
}
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
a536aa29
...
...
@@ -32,6 +32,7 @@
#include "nr_dci.h"
#include "nr_dlsch.h"
#include "nr_sch_dmrs.h"
#include "PHY/MODULATION/nr_modulation.h"
//#define DEBUG_PDCCH_DMRS
...
...
@@ -216,9 +217,9 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
#endif
}
nr_modulation
(
dmrs_seq
,
dmrs_length
,
2
,
mod_dmrs
[
symb
]);
//Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
dmrs_seq
,
dmrs_length
,
DMRS_MOD_ORDER
,
mod_dmrs
[
symb
]);
//Qm = 2 as DMRS is QPSK modulated
}
else
nr_modulation
(
gold_pdcch_dmrs
[
symb
],
dmrs_length
,
2
,
mod_dmrs
[
symb
]);
//Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
gold_pdcch_dmrs
[
symb
],
dmrs_length
,
DMRS_MOD_ORDER
,
mod_dmrs
[
symb
]);
//Qm = 2 as DMRS is QPSK modulated
#ifdef DEBUG_PDCCH_DMRS
...
...
@@ -263,7 +264,7 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
#endif
/// QPSK modulation
int16_t
mod_dci
[
NR_MAX_DCI_SIZE
>>
1
];
nr_modulation
(
scrambled_output
,
encoded_length
,
2
,
mod_dci
);
//Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
scrambled_output
,
encoded_length
,
DMRS_MOD_ORDER
,
mod_dci
);
//Qm = 2 as DMRS is QPSK modulated
#ifdef DEBUG_DCI
for
(
int
i
=
0
;
i
<
encoded_length
>>
1
;
i
++
)
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
a536aa29
...
...
@@ -173,7 +173,7 @@ for (int l=0; l<rel15->nb_layers; l++)
uint8_t
mapping_type
=
config
->
pdsch_config
.
mapping_type
.
value
;
l0
=
get_l0
(
mapping_type
,
2
,
0
);
//config->pdsch_config.dmrs_typeA_position.value);
nr_modulation
(
pdsch_dmrs
[
l0
][
0
],
n_dmrs
,
2
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
pdsch_dmrs
[
l0
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
#ifdef DEBUG_DLSCH
printf
(
"DMRS modulation (single symbol %d, %d symbols, type %d):
\n
"
,
l0
,
n_dmrs
>>
1
,
dmrs_type
);
...
...
openair1/PHY/NR_TRANSPORT/nr_sch_dmrs.h
View file @
a536aa29
...
...
@@ -34,6 +34,7 @@
#define NR_PDSCH_DMRS_ANTENNA_PORT0 1000
#define NR_PDSCH_DMRS_NB_ANTENNA_PORTS 12
#define DMRS_MOD_ORDER 2
void
get_l_prime
(
uint8_t
*
l_prime
,
uint8_t
n_symbs
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
a536aa29
...
...
@@ -43,7 +43,7 @@ void nr_pusch_codeword_scrambling(uint8_t *in,
uint32_t
*
out
)
{
uint8_t
reset
,
b_idx
;
uint32_t
x1
,
x2
,
s
=
0
;
uint32_t
x1
,
x2
,
s
=
0
,
temp_out
;
reset
=
1
;
x2
=
(
n_RNTI
<<
15
)
+
Nid
;
...
...
@@ -58,8 +58,16 @@ void nr_pusch_codeword_scrambling(uint8_t *in,
}
if
(
in
[
i
]
==
NR_PUSCH_x
)
*
out
^=
1
<<
b_idx
;
else
if
(
in
[
i
]
==
NR_PUSCH_y
)
*
out
^=
(
*
out
&
(
1
<<
b_idx
-
1
))
<<
b_idx
;
else
if
(
in
[
i
]
==
NR_PUSCH_y
){
if
(
b_idx
!=
0
)
*
out
^=
(
*
out
&
(
1
<<
(
b_idx
-
1
)))
<<
1
;
else
{
temp_out
=
*
(
out
-
1
);
*
out
^=
temp_out
>>
31
;
}
}
else
*
out
^=
(((
in
[
i
])
&
1
)
^
((
s
>>
b_idx
)
&
1
))
<<
b_idx
;
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
a536aa29
...
...
@@ -46,6 +46,7 @@
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
#include "PHY/NR_TRANSPORT/nr_sch_dmrs.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "SCHED_NR/sched_nr.h"
...
...
@@ -595,7 +596,7 @@ int main(int argc, char **argv) {
mapping_type
=
UE
->
pusch_config
.
pusch_TimeDomainResourceAllocation
[
0
]
->
mappingType
;
l0
=
get_l0
(
mapping_type
,
2
,
1
);
nr_modulation
(
pusch_dmrs
[
l0
][
0
],
n_dmrs
,
2
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
nr_modulation
(
pusch_dmrs
[
l0
][
0
],
n_dmrs
,
DMRS_MOD_ORDER
,
mod_dmrs
);
// currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
///////////
...
...
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