intermediate commit
This commit is contained in:
@@ -1054,11 +1054,7 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
|
||||
pusch_pdu->data_scrambling_id = *scc->physCellId;
|
||||
pusch_pdu->nrOfLayers = 1;
|
||||
pusch_pdu->ul_dmrs_symb_pos = get_l_prime(nr_of_symbols,mappingtype,pusch_dmrs_pos2,pusch_len1,start_symbol_index, scc->dmrs_TypeA_Position);
|
||||
<<<<<<< HEAD
|
||||
LOG_I(MAC, "MSG3 mcs %d, nb_rb %d, first_rb %d, start_sym:%d NR Symb:%d mappingtype:%d , ul_dmrs_symb_pos:%x\n", pusch_pdu->mcs_index,msg3_nb_rb,msg3_first_rb, start_symbol_index, nr_of_symbols, mappingtype, pusch_pdu->ul_dmrs_symb_pos);
|
||||
=======
|
||||
LOG_D(NR_MAC, "MSG3 start_sym:%d NR Symb:%d mappingtype:%d, ul_dmrs_symb_pos:%x\n", start_symbol_index, nr_of_symbols, mappingtype, pusch_pdu->ul_dmrs_symb_pos);
|
||||
>>>>>>> tdd25period_for_MR
|
||||
pusch_pdu->dmrs_config_type = 0;
|
||||
pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId; //If provided and the PUSCH is not a msg3 PUSCH, otherwise, L2 should set this to physical cell id.
|
||||
pusch_pdu->scid = 0; //DMRS sequence initialization [TS38.211, sec 6.4.1.1.1]. Should match what is sent in DCI 0_1, otherwise set to 0.
|
||||
|
||||
@@ -221,6 +221,42 @@ int aw2s_oricleanup(openair0_device *device) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
typedef struct fhstate_s {
|
||||
int Npackets;
|
||||
openair0_timestamp olddeltaTS;
|
||||
openair0_timestamp oldTS;
|
||||
int fhjumps;
|
||||
openair0_device *device;
|
||||
int r0;
|
||||
int r1;
|
||||
int r2;
|
||||
int r3;
|
||||
} fhstate_t;
|
||||
|
||||
openair0_timestamp TS;
|
||||
int64_t deltaTS,olddeltaTS=-1;
|
||||
int aid,r0=0;
|
||||
r1=(openair0_cfg->rx_num_channels > 1) ? 0 : 1;
|
||||
for (i=0;i<fhstate->Npackets;i++) {
|
||||
device->trx_read_func2(fhstate->device,
|
||||
fhstate->TS,
|
||||
NULL,
|
||||
256,
|
||||
0,
|
||||
&aid);
|
||||
if (aid == 0) fhstate->r0=1;
|
||||
if (aid == 1) fhstate->r1=1;
|
||||
if (aid == 2) fhstate->r2=1;
|
||||
if (aid == 3) fhstate->r3=1;
|
||||
if (aid==0) {
|
||||
deltaTS = TS-oldTS;
|
||||
fhstate-> oldTS=TS;
|
||||
if (deltaTS != fhstate->olddeltaTS && fhstate->olddeltaTS > 0) {
|
||||
fhstate->fhjumps++;
|
||||
}
|
||||
if (i>0) fhstate->olddeltaTS = deltaTS;
|
||||
}
|
||||
}
|
||||
int aw2s_startstreaming(openair0_device *device) {
|
||||
|
||||
ORI_s * ori = (ORI_s*)device->thirdparty_priv;
|
||||
@@ -414,7 +450,6 @@ int aw2s_startstreaming(openair0_device *device) {
|
||||
/*
|
||||
while (rx0->fst != ORI_FST_Operational ||
|
||||
(openair0_cfg->rx_num_channels > 1 && rx1->fst != ORI_FST_Operational) ||
|
||||
<<<<<<< HEAD
|
||||
(openair0_cfg->rx_num_channels > 2 && rx2->fst != ORI_FST_Operational) ||
|
||||
(openair0_cfg->rx_num_channels > 3 && rx3->fst != ORI_FST_Operational))
|
||||
{}
|
||||
@@ -422,45 +457,43 @@ int aw2s_startstreaming(openair0_device *device) {
|
||||
// test RX interface
|
||||
uint64_t TS;
|
||||
int64_t deltaTS,olddeltaTS=-1;
|
||||
=======
|
||||
tx0->fst != ORI_FST_Operational ||
|
||||
(openair0_cfg->tx_num_channels > 1 && tx1->fst != ORI_FST_Operational))
|
||||
{}*/
|
||||
// test RX interface
|
||||
uint64_t TS;
|
||||
char temp_rx[2048] __attribute__((aligned(32)));
|
||||
>>>>>>> tdd25period_for_MR
|
||||
int aid,r0=0,r1=(openair0_cfg->rx_num_channels > 1) ? 0 : 1;
|
||||
int r2=(openair0_cfg->rx_num_channels > 2) ? 0 : 1;
|
||||
int r3=(openair0_cfg->rx_num_channels > 3) ? 0 : 1;
|
||||
|
||||
int i;
|
||||
int Npackets=1024000;
|
||||
openair0_timestamp oldTS=0;
|
||||
int fhjumps=0;
|
||||
for (i=0;i<Npackets;i++) {
|
||||
device->trx_read_func2(device,
|
||||
fhstate_t fhstate;
|
||||
|
||||
fhstate.Npackets=1024000;
|
||||
fhstate.oldTS=0;
|
||||
fhstate.fhjumps=0;
|
||||
fhstate.r0=0;
|
||||
fhstate.r1=(openair0_cfg->rx_num_channels > 1) ? 0 : 1;
|
||||
fhstate.r2=(openair0_cfg->rx_num_channels > 2) ? 0 : 1;
|
||||
fhstate.r3=(openair0_cfg->rx_num_channels > 3) ? 0 : 1;
|
||||
for (i=0;i<fhstate->Npackets;i++) {
|
||||
device->trx_read_func2(fhstate->device,
|
||||
(openair0_timestamp*)&TS,
|
||||
NULL,
|
||||
256,
|
||||
0,
|
||||
&aid);
|
||||
if (aid == 0) r0=1;
|
||||
if (aid == 1) r1=1;
|
||||
if (aid == 2) r2=1;
|
||||
if (aid == 3) r3=1;
|
||||
if (aid == 0) fhstate->r0=1;
|
||||
if (aid == 1) fhstate->r1=1;
|
||||
if (aid == 2) fhstate->r2=1;
|
||||
if (aid == 3) fhstate->r3=1;
|
||||
if (aid==0) {
|
||||
deltaTS = TS-oldTS;
|
||||
oldTS=TS;
|
||||
if (deltaTS != olddeltaTS && olddeltaTS > 0) {
|
||||
fhjumps++;
|
||||
deltaTS = TS-fhstate->oldTS;
|
||||
fhstate->oldTS=TS;
|
||||
if (deltaTS != fhstate->olddeltaTS && fhstate->olddeltaTS > 0) {
|
||||
fhstate->fhjumps++;
|
||||
}
|
||||
if (i>0) olddeltaTS = deltaTS;
|
||||
if (i>0) fhstate->olddeltaTS = deltaTS;
|
||||
}
|
||||
}
|
||||
if (r0==1 && r1==1 && r2==1 && r3==1) printf("Streaming started, returning to OAI, fghjumps %d\n",fhjumps);
|
||||
if (fhstate.r0==1 && fhstate.r1==1 && fhstate.r2==1 && fhstate.r3==1) printf("Streaming started, returning to OAI, fhjumps %d\n",fhjumps);
|
||||
else {
|
||||
printf("Didn't get anything from one antenna port after %d packets %d,%d,%d,%d\n",Npackets,r0,r1,r2,r3);
|
||||
printf("Didn't get anything from one antenna port after %d packets %d,%d,%d,%d\n",fhstate.Npackets,fhstate.r0,fhstate.r1,fhstate.r2,fhstater3);
|
||||
return(-1);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -400,6 +400,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, uin
|
||||
static int packet_cnt=0;
|
||||
int payload_size = UDP_PACKET_SIZE_BYTES(nsamps);
|
||||
|
||||
// we need a temporary storage buffer since the antenna ID is in the packet
|
||||
int nsamps2 = (payload_size>>2)+(APP_HEADER_SIZE_BYTES>>2);
|
||||
int32_t temp_rx[nsamps2+1];
|
||||
char *temp_rx0 = ((char *)&temp_rx[1+(APP_HEADER_SIZE_BYTES>>2)]) - APP_HEADER_SIZE_BYTES;
|
||||
@@ -446,9 +447,8 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, uin
|
||||
} else {
|
||||
/* store the timestamp value from packet's header */
|
||||
*timestamp = *(openair0_timestamp *)(temp_rx0 + ECPRICOMMON_BYTES+ECPRIPCID_BYTES);
|
||||
// convert TS to samples, /3 for 30.72 Ms/s, /6 for 15.36 Ms/s, /12 for 7.68 Ms/s, etc.
|
||||
// convert TS to samples, /6 for AW2S @ 30.72 Ms/s, this is converted for other sample rates in OAI application
|
||||
*timestamp = *timestamp/6;
|
||||
// handle 1.4,3,5,10,15 MHz cases
|
||||
*cc = *(uint16_t*)(temp_rx0 + ECPRICOMMON_BYTES);
|
||||
}
|
||||
eth->rx_actual_nsamps=payload_size>>2;
|
||||
|
||||
Reference in New Issue
Block a user