Commit 54b380be authored by Florian Kaltenberger's avatar Florian Kaltenberger

WIP2

parent 27f376b1
......@@ -211,16 +211,21 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
uint16_t nb_symbols = rel15->nb_mod_symbols;
uint8_t Qm = rel15->modulation_order;
uint16_t encoded_length = nb_symbols*Qm;
static uint8_t print=1;
/// CRC, coding, interleaving and rate matching
nr_dlsch_encoding(harq->pdu, subframe, &dlsch, &frame_parms);
#ifdef DEBUG_DLSCH
printf("PDSCH encoding:\nPayload:\n");
for (int i=0; i<TBS>>7; i++) {
//#ifdef DEBUG_DLSCH
if (print) {
print = 0;
printf("PDSCH encoding:\nPayload:\n");
for (int i=0; i<TBS>>7; i++) {
for (int j=0; j<16; j++)
printf("0x%02x\t", harq->pdu[(i<<4)+j]);
printf("\n");
}
}
}
#ifdef DEBUG_DLSCH
printf("\nEncoded payload:\n");
for (int i=0; i<encoded_length>>3; i++) {
for (int j=0; j<8; j++)
......
......@@ -52,7 +52,7 @@
//#define NR_PDCCH_DCI_DEBUG // activates NR_PDCCH_DCI_DEBUG logs
#define NR_NBR_CORESET_ACT_BWP 3 // The number of CoreSets per BWP is limited to 3 (including initial CORESET: ControlResourceId 0)
#define NR_NBR_SEARCHSPACE_ACT_BWP 10 // The number of SearSpaces per BWP is limited to 10 (including initial SEARCHSPACE: SearchSpaceId 0)
#define PDCCH_TEST_POLAR_TEMP_FIX
//#define PDCCH_TEST_POLAR_TEMP_FIX
......
......@@ -537,13 +537,13 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process->c[r][m]= (uint8_t) llrProcBuf[m];
}
#ifdef DEBUG_DLSCH_DECODING
//#ifdef DEBUG_DLSCH_DECODING
//printf("output decoder %d %d %d %d %d \n", harq_process->c[r][0], harq_process->c[r][1], harq_process->c[r][2],harq_process->c[r][3], harq_process->c[r][4]);
for (int k=0;k<32;k++)
printf("output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
printf("no_iterations_ldpc %d (ret %d)\n",no_iteration_ldpc,ret);
LOG_I(PHY,"output decoder [%d] = 0x%02x \n", k, harq_process->c[r][k]);
LOG_I(PHY,"no_iterations_ldpc %d (ret %d)\n",no_iteration_ldpc,ret);
//write_output("dec_output.m","dec0",harq_process->c[0],Kr_bytes,1,4);
#endif
//#endif
#if UE_TIMING_TRACE
......
......@@ -160,7 +160,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
//set active for testing -> to be removed
dlsch[0]->harq_processes[harq_pid]->status = ACTIVE;
dlsch[0]->harq_processes[harq_pid]->Qm = 2;
dlsch[0]->harq_processes[harq_pid]->mcs = 9;
dlsch[0]->harq_processes[harq_pid]->mcs = 8;
dlsch[0]->harq_processes[harq_pid]->Nl=1;
dlsch[0]->harq_processes[harq_pid]->nb_rb = nb_rb_pdsch;
frame_parms->nushift = 0;
......
......@@ -496,7 +496,7 @@ void nr_pbch_quantize(int16_t *pbch_llr8,
if (pbch_llr[i]>31)
pbch_llr8[i]=32;
else if (pbch_llr[i]<-31)
pbch_llr8[i]=-32;
pbch_llr8[i]=-31;
else
pbch_llr8[i] = (char)(pbch_llr[i]);
......
......@@ -732,6 +732,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
}
fl_set_xyplot_data(form->pbch_llr,bit_pbch,llr_pbch,864,"","","");
fl_set_xyplot_ybounds(form->pbch_llr,-32,32);
}
if (phy_vars_ue->is_synchronized==1)
......
......@@ -184,7 +184,7 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
num_dci = gNB->pdcch_vars.num_dci;
num_pdsch_rnti = gNB->pdcch_vars.num_pdsch_rnti;
if (num_dci && (subframe==1)) {
if (num_dci) {
LOG_I(PHY, "[gNB %d] Frame %d subframe %d \
Calling nr_generate_dci_top (number of DCI %d)\n", gNB->Mod_id, frame, subframe, num_dci);
......
......@@ -81,7 +81,7 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
dlsch_pdu_rel15->rnti = rnti;
dlsch_pdu_rel15->nb_layers =1;
dlsch_pdu_rel15->nb_codewords = 1;
dlsch_pdu_rel15->mcs_idx = 9;
dlsch_pdu_rel15->mcs_idx = 8;
dlsch_pdu_rel15->ndi = 1;
dlsch_pdu_rel15->redundancy_version = 0;
......
......@@ -147,13 +147,13 @@ eNBs =
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth6";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth6";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
ENB_INTERFACE_NAME_FOR_S1_MME = "enp0s20f0u11";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.110/24";
ENB_INTERFACE_NAME_FOR_S1U = "enp0s20f0u11";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.110/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.111/24";
ENB_IPV4_ADDRESS_FOR_X2C = "192.168.12.110/24";
ENB_PORT_FOR_X2C = 36422; # Spec 36422
};
}
......@@ -187,7 +187,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 116;
eNB_instances = [0];
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.100.8,clock_src=external";
}
);
......
......@@ -254,8 +254,8 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.100.8";
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.100.8,clock_src=external,time_src=external";
#clock_src = "external";
}
);
......
......@@ -500,7 +500,7 @@ static void get_options(unsigned int *start_msc) {
int CC_id;
int tddflag, nonbiotflag;
char *loopfile=NULL;
int dumpframe;
int dumpframe = 0;
uint32_t online_log_messages;
uint32_t glog_level;
uint32_t start_telnetsrv;
......
......@@ -900,7 +900,7 @@ void *UE_thread(void *arg) {
for (int i=0; i<UE->frame_parms.nb_antennas_rx; i++)
rxp[i] = (void*)&dummy_rx[i][0];
for (int sf=0; sf<NR_NUMBER_OF_SUBFRAMES_PER_FRAME; sf++)
// printf("Reading dummy sf %d\n",sf);
//LOG_I(PHY,"Reading dummy sf %d\n",sf);
AssertFatal(UE->frame_parms.samples_per_subframe==
UE->rfdevice.trx_read_func(&UE->rfdevice,
&timestamp,
......@@ -997,7 +997,7 @@ void *UE_thread(void *arg) {
UE->rx_offset < 10*UE->frame_parms.samples_per_subframe )
UE->rx_offset_diff = 1;
LOG_D(PHY,"AbsSubframe %d.%d TTI SET rx_off_diff to %d rx_offset %d \n",proc->frame_rx,subframe_nr,UE->rx_offset_diff,UE->rx_offset);
LOG_I(PHY,"AbsSubframe %d.%d TTI SET rx_off_diff to %d rx_offset %d \n",proc->frame_rx,subframe_nr,UE->rx_offset_diff,UE->rx_offset);
readBlockSize=UE->frame_parms.samples_per_subframe -
UE->frame_parms.ofdm_symbol_size -
UE->frame_parms.nb_prefix_samples0 -
......
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