Commit 21b736cf authored by Khalid Ahmed's avatar Khalid Ahmed Committed by Thomas Schlichter

Fixing DMRS generation in nr_ulsim

parent 688acc49
...@@ -259,7 +259,14 @@ uint8_t get_l0_ul(uint8_t mapping_type, uint8_t dmrs_typeA_position) { ...@@ -259,7 +259,14 @@ uint8_t get_l0_ul(uint8_t mapping_type, uint8_t dmrs_typeA_position) {
*********************************************************************/ *********************************************************************/
uint16_t get_dmrs_freq_idx_ul(uint8_t n, uint8_t k_prime, uint8_t delta, uint8_t dmrs_type) { uint16_t get_dmrs_freq_idx_ul(uint8_t n, uint8_t k_prime, uint8_t delta, uint8_t dmrs_type) {
uint16_t dmrs_idx = (dmrs_type)? (6*n+k_prime+delta):((n<<2)+(k_prime<<1)+delta);
uint16_t dmrs_idx;
if (dmrs_type == pusch_dmrs_type1)
dmrs_idx = ((n<<2)+(k_prime<<1)+delta);
else
dmrs_idx = (6*n+k_prime+delta);
return dmrs_idx; return dmrs_idx;
} }
......
...@@ -168,6 +168,7 @@ int main(int argc, char **argv) { ...@@ -168,6 +168,7 @@ int main(int argc, char **argv) {
cpuf = get_cpu_freq_GHz(); cpuf = get_cpu_freq_GHz();
if (load_configmodule(argc, argv) == 0) { if (load_configmodule(argc, argv) == 0) {
exit_fun("[SOFTMODEM] Error, configuration module init failed\n"); exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
} }
...@@ -590,7 +591,7 @@ int main(int argc, char **argv) { ...@@ -590,7 +591,7 @@ int main(int argc, char **argv) {
mapping_type = UE->pusch_config.pusch_TimeDomainResourceAllocation[0]->mappingType; mapping_type = UE->pusch_config.pusch_TimeDomainResourceAllocation[0]->mappingType;
l0 = get_l0_ul(mapping_type, 2); l0 = get_l0_ul(mapping_type, 2);
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 nr_modulation(pusch_dmrs[l0][0], n_dmrs*2, DMRS_MOD_ORDER, mod_dmrs); // currently only codeword 0 is modulated. Qm = 2 as DMRS is QPSK modulated
/////////// ///////////
...@@ -606,6 +607,7 @@ int main(int argc, char **argv) { ...@@ -606,6 +607,7 @@ int main(int argc, char **argv) {
available_bits/mod_order, available_bits/mod_order,
tx_layers); tx_layers);
/////////// ///////////
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment