Commit afa7ef9a authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'NR_RRC_harq_hacks' of...

Merge branch 'NR_RRC_harq_hacks' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_RRC_harq_hacks
parents 70dff719 014e045b
...@@ -176,7 +176,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -176,7 +176,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
} }
uint32_t Nid_pusch[2] = {cfg->cell_config.phy_cell_id.value,cfg->cell_config.phy_cell_id.value}; uint32_t Nid_pusch[2] = {cfg->cell_config.phy_cell_id.value,cfg->cell_config.phy_cell_id.value};
LOG_D(PHY,"Initializing PUSCH DMRS Gold sequence with (%x,%x)\n",Nid_pusch[1],Nid_pusch[2]); LOG_D(PHY,"Initializing PUSCH DMRS Gold sequence with (%x,%x)\n",Nid_pusch[0],Nid_pusch[1]);
nr_gold_pusch(gNB, &Nid_pusch[0]); nr_gold_pusch(gNB, &Nid_pusch[0]);
/// Transport init necessary for NR synchro /// Transport init necessary for NR synchro
......
...@@ -70,14 +70,16 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB, ...@@ -70,14 +70,16 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
wf = (dmrs_type==pusch_dmrs_type1) ? wf1 : wf2; wf = (dmrs_type==pusch_dmrs_type1) ? wf1 : wf2;
wt = (dmrs_type==pusch_dmrs_type1) ? wt1 : wt2; wt = (dmrs_type==pusch_dmrs_type1) ? wt1 : wt2;
int dmrs_offset = re_offset/((dmrs_type==pusch_dmrs_type1)?2:3);
if (dmrs_type > 2) if (dmrs_type > 2)
LOG_E(PHY,"PUSCH DMRS config type %d not valid\n", dmrs_type+1); LOG_E(PHY,"PUSCH DMRS config type %d not valid\n", dmrs_type+1);
if ((p>=1000) && (p<((dmrs_type==pusch_dmrs_type1) ? 1008 : 1012))) { if ((p>=1000) && (p<((dmrs_type==pusch_dmrs_type1) ? 1008 : 1012))) {
if (gNB->frame_parms.Ncp == NORMAL) { if (gNB->frame_parms.Ncp == NORMAL) {
nb_dmrs = ((dmrs_type==pusch_dmrs_type1) ? 6:4); nb_dmrs = ((dmrs_type==pusch_dmrs_type1) ? 6:4);
for (int i=re_offset; i<re_offset+(nb_pusch_rb*nb_dmrs); i++) { for (int i=dmrs_offset; i<dmrs_offset+(nb_pusch_rb*nb_dmrs); i++) {
k = i-re_offset; k = i-dmrs_offset;
w = (wf[p-1000][i&1])*(wt[p-1000][lp]); w = (wf[p-1000][i&1])*(wt[p-1000][lp]);
mod_table = (w==1) ? nr_rx_mod_table : nr_rx_nmod_table; mod_table = (w==1) ? nr_rx_mod_table : nr_rx_nmod_table;
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
#include "intertask_interface.h" #include "intertask_interface.h"
//#define DEBUG_RXDATA
uint8_t SSB_Table[38]={0,2,4,6,8,10,12,14,254,254,16,18,20,22,24,26,28,30,254,254,32,34,36,38,40,42,44,46,254,254,48,50,52,54,56,58,60,62}; uint8_t SSB_Table[38]={0,2,4,6,8,10,12,14,254,254,16,18,20,22,24,26,28,30,254,254,32,34,36,38,40,42,44,46,254,254,48,50,52,54,56,58,60,62};
extern uint8_t nfapi_mode; extern uint8_t nfapi_mode;
...@@ -436,6 +438,17 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -436,6 +438,17 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
(ulsch_harq->slot == slot_rx) && (ulsch_harq->slot == slot_rx) &&
(ulsch_harq->handled == 0)){ (ulsch_harq->handled == 0)){
#ifdef DEBUG_RXDATA
int slot_offset = frame_parms->get_samples_slot_timestamp(slot_rx,frame_parms,0);
slot_offset -= ru->N_TA_offset;
char name[128];
FILE *f;
sprintf(name, "rxdata.%d.%d.raw", frame_rx,slot_rx);
f = fopen(name, "w"); if (f == NULL) exit(1);
fwrite(&ru->common.rxdata[0][slot_offset],2,frame_parms->get_samples_per_slot(slot_rx,frame_parms)*2, f);
fclose(f);
#endif
uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index; uint8_t symbol_start = ulsch_harq->ulsch_pdu.start_symbol_index;
uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols; uint8_t symbol_end = symbol_start + ulsch_harq->ulsch_pdu.nr_of_symbols;
for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) { for(uint8_t symbol = symbol_start; symbol < symbol_end; symbol++) {
......
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