reset for remerging

This commit is contained in:
Wang Tsu-Han
2018-07-30 11:24:08 +02:00
parent 0b405e3d2b
commit aa00a4734a
516 changed files with 11979 additions and 768789 deletions
@@ -929,7 +929,7 @@ void calibrate_rf(openair0_device *device) {
bladerf_set_loopback(brf->dev,BLADERF_LB_NONE);
bladerf_set_gain(brf->dev, BLADERF_MODULE_RX, (unsigned int) device->openair0_cfg->rx_gain[0]-device->openair0_cfg[0].rx_gain_offset[0]);
bladerf_set_gain(brf->dev, BLADERF_MODULE_TX, (unsigned int) device->openair0_cfg->tx_gain[0]);
// write_output("blade_rf_test.m","rxs",calib_buff,RXDCLENGTH,1,1);
// LOG_M("blade_rf_test.m","rxs",calib_buff,RXDCLENGTH,1,1);
}
/*! \brief Initialize Openair BLADERF target. It returns 0 if OK
@@ -135,12 +135,6 @@ struct em1_private_s {
extern struct em1_private_s *em1_devices[MAX_EM1_DEVICES];
/* em1_drv.c */
#if 0
static int em1_open(struct inode *inode, struct file *file);
static int em1_release(struct inode *inode, struct file *file);
static int __init em1_init(void);
static void __exit em1_cleanup(void);
#endif
int em1_user_op_enter(struct em1_private_s *pv, wait_queue_t *wait,
wait_queue_head_t *wh, int busy_flag, int new_state);
void em1_user_op_leave(struct em1_private_s *pv, wait_queue_t *wait,
@@ -153,9 +147,6 @@ ssize_t em1_write(struct file *file, const char __user *buf, size_t size, loff_t
ssize_t em1_read(struct file *file, char __user *buf, size_t size, loff_t *ppos);
/* em1_dev.c */
#if 0
static irqreturn_t irq_handler(int irq, void *dev_id);
#endif
int __devinit em1_probe(struct pci_dev *dev, const struct pci_device_id *id);
void __devexit em1_remove(struct pci_dev *dev);
@@ -184,14 +175,6 @@ struct em1_ioctl_fifo_params {
size_t count;
};
#if 0
static int em1_ioctl_fifo_write(struct em1_private_s *pv,
struct em1_ioctl_fifo_params *p);
static int em1_ioctl_fifo_read(struct em1_private_s *pv,
struct em1_ioctl_fifo_params *p);
static int em1_ioctl_alloc(struct em1_private_s *pv, void **buf);
#endif
/*
* Local Variables:
* c-file-style: "linux"
+6 -1
View File
@@ -376,6 +376,7 @@ static void trx_usrp_end(openair0_device *device) {
s->tx_md.end_of_burst = true;
s->tx_stream->send("", 0, s->tx_md);
s->tx_md.end_of_burst = false;
sleep(1);
#if defined(USRP_REC_PLAY)
}
#endif
@@ -483,7 +484,11 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
s->tx_md.start_of_burst = false;
s->tx_md.end_of_burst = false;
}
if(flags==10){ // fail safe mode
s->tx_md.has_time_spec = false;
s->tx_md.start_of_burst = false;
s->tx_md.end_of_burst = true;
}
if (cc>1) {
std::vector<void *> buff_ptrs;
for (int i=0; i<cc; i++)
+1 -1
View File
@@ -47,7 +47,7 @@ typedef struct {
} iqrec_t;
#define DEF_NB_SF 120000 // default nb of sf or ms to capture (2 minutes at 5MHz)
#define DEF_SF_FILE "/home/nokia/iqfile" // default subframes file name
#define DEF_SF_DELAY_READ 400 // default read delay µs (860=real)
#define DEF_SF_DELAY_READ 700 // default read delay µs (860=real)
#define DEF_SF_DELAY_WRITE 15 // default write delay µs (15=real)
#define DEF_SF_NB_LOOP 5 // default nb loops
-14
View File
@@ -182,16 +182,6 @@ static void get_sample_from_mobipass(queue_state_t *qstate, char *I, char *Q, ui
struct mobipass_header *mh = NULL;
uint32_t packet_timestamp = 0;
#if 0
uint32_t old_start = qstate->from_mobipass.start;
uint32_t old_len = qstate->from_mobipass.len;
b = qstate->from_mobipass.buf[qstate->from_mobipass.start];
mh = (struct mobipass_header *)(b+14);
uint32_t old_pts = qstate->from_mobipass.len ? ntohl(mh->timestamp) : -1;
b=NULL;
mh=NULL;
#endif
while (qstate->from_mobipass.len) {
b = qstate->from_mobipass.buf[qstate->from_mobipass.start];
mh = (struct mobipass_header *)(b+14);
@@ -222,10 +212,6 @@ nodata:
*Q = 0;
log_missed_sample(qstate, timestamp);
#if 0
printf("no sample timestamp %u pt %u start %d old_start %d old_pt %u len %d old len %d\n", timestamp, packet_timestamp, qstate->from_mobipass.start, old_start, old_pts, qstate->from_mobipass.len, old_len);
#endif
}
/* doesn't work with delay more than 1s */
@@ -4,6 +4,7 @@ To build the basic simulator:
cd [openair top directory]
. oaienv
cd cmake_targets
./build_oai -I -w USRP
./build_oai --basic-simulator
cd ../common/utils/T/tracer
make
@@ -20,14 +21,14 @@ In the other terminal, run:
cd [openair top directory]
cd cmake_targets/basic_simulator/enb
export ENODEB=1
sudo -E ./lte-softmodem -O [configuration file]
sudo -E ./lte-softmodem -O [configuration file] --T_stdout 0
[configuration file] is just a regular configuration file.
The eNB needs an EPC.
To run the UE, open a terminal and run:
cd [openair top directory]
cd cmake_targets/basic_simulator/ue
sudo ./lte-uesoftmodem -C 2680000000 -r 25
sudo ./lte-uesoftmodem -C 2680000000 -r 25 --ue-rxgain 140
Adapt the value of -r, it has to match the value N_RB_DL in the configuration
file of the eNB. (Same for -C which should match the value downlink_frequency
in the configuration file.)
-8
View File
@@ -225,14 +225,6 @@ int tcp_bridge_read(openair0_device *device, openair0_timestamp *timestamp, void
b = &t->b[t->bstart];
#if 0
typedef struct {
int32_t data[30720]; /* max 20MHz */
unsigned long timestamp;
int size;
} input_buffer;
#endif
if (b->timestamp != t->read_timestamp) abort();
if (b->size != nsamps * 4) abort();