Commit d08355a9 authored by Raymond Knopp's avatar Raymond Knopp

testing beamforming

parent 9e1c9483
......@@ -756,8 +756,14 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
}
// the beam index is written in bits 8-10 of the flags
// the following choice cycles through the beams every slot, starting with beam 3
flags |= ((3+slot)&7)<<8;
// beam index>3 will be ignored for now
int beam=7;
if (slot==0) beam=0;
if (slot==10) beam=1;
if (slot==20) beam=2;
if (slot==40) beam=3;
flags |= beam<<8;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS, flags );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame );
......
......@@ -384,7 +384,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if (is_nr_UL_slot(cc->ServingCellConfigCommon,slot_rxP)) {
if (phy_test && slot_rxP==8){
nr_schedule_uss_ulsch_phytest(module_idP, frame_rxP, slot_rxP);
//nr_schedule_uss_ulsch_phytest(module_idP, frame_rxP, slot_rxP);
}
}
......
......@@ -285,7 +285,7 @@ static int trx_usrp_start(openair0_device *device) {
// (we use full duplex here, because our RX is on all the time - this might need to change later)
s->usrp->set_gpio_attr("FP0", "ATR_XX", (1<<5), 0x7f);
// set the output pins to 0
s->usrp->set_gpio_attr("FP0", "OUT", 3<<7, 0xf80);
s->usrp->set_gpio_attr("FP0", "OUT", 7<<7, 0xf80);
// init recv and send streaming
uhd::stream_cmd_t cmd(uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS);
......@@ -482,8 +482,6 @@ static int trx_usrp_write(openair0_device *device,
last_packet_state = true;
}
// push GPIO bits 7-9 from flags_msb
int gpio789=(flags_msb&7)<<7;
s->tx_md.has_time_spec = true;
s->tx_md.start_of_burst = (s->tx_count==0) ? true : first_packet_state;
......@@ -491,9 +489,13 @@ static int trx_usrp_write(openair0_device *device,
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
s->tx_count++;
if (flags_msb<4) {
// push GPIO bits 7-9 from flags_msb
int gpio789=(flags_msb&7)<<7;
s->usrp->set_command_time(s->tx_md.time_spec);
s->usrp->set_gpio_attr("FP0", "OUT", gpio789, 0xfff);
s->usrp->set_gpio_attr("FP0", "OUT", gpio789, 0x380);
s->usrp->clear_command_time();
}
if (cc>1) {
std::vector<void *> buff_ptrs;
......@@ -502,7 +504,11 @@ static int trx_usrp_write(openair0_device *device,
buff_ptrs.push_back(&(((int16_t *)buff_tx[i])[0]));
ret = (int)s->tx_stream->send(buff_ptrs, nsamps, s->tx_md);
} else ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[0]), nsamps, s->tx_md);
}
else {
ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[0]), nsamps, s->tx_md);
}
if (ret != nsamps) LOG_E(HW,"[xmit] tx samples %d != %d\n",ret,nsamps);
return ret;
......
......@@ -237,8 +237,8 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "type=x300";
if_freq = 3000000000;
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2";
if_freq = 5300000000;
}
);
......
......@@ -237,8 +237,7 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2";
clock_src = "external";
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2";
}
);
......
......@@ -251,8 +251,8 @@ RUs = (
max_pdschReferenceSignalPower = -27;
max_rxgain = 114;
eNB_instances = [0];
sdr_addrs = "addr=192.168.10.2,mgmt_addr=192.168.10.2";
clock_src = "external";
sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2,mgmt_addr=192.168.12.2";
#clock_src = "external";
}
);
......
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