Commit c2b3867f authored by WANG Tsu-Han's avatar WANG Tsu-Han

fix for not using pointer to stash

parent 61a24472
...@@ -763,7 +763,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { ...@@ -763,7 +763,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
txp[i] = (void *)&ru->common.txdata[i][(slot*fp->samples_per_slot)-sf_extension]; txp[i] = (void *)&ru->common.txdata[i][(slot*fp->samples_per_slot)-sf_extension];
} }
print_test[0] = (char *)&ru->common.txdata[0][(slot*fp->samples_per_slot)-sf_extension]; print_test[0] = (char *)&ru->common.txdata[0][(slot*fp->samples_per_slot)-sf_extension];
printf("txdata[0] = %d\n", print_test[0]); printf("txdata[0] = %p\n", print_test[0]);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp-ru->openair0_cfg.tx_sample_advance)&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp-ru->openair0_cfg.tx_sample_advance)&0xffffffff );
......
...@@ -278,7 +278,7 @@ typedef struct { ...@@ -278,7 +278,7 @@ typedef struct {
typedef struct { typedef struct {
openair0_timestamp timestamp; openair0_timestamp timestamp;
void **buff;// buffer to be write; void *buff[8];// buffer to be write;
int nsamps; int nsamps;
int cc; int cc;
signed char first_packet; signed char first_packet;
......
...@@ -440,7 +440,7 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, ...@@ -440,7 +440,7 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
first_packet_state = false; first_packet_state = false;
last_packet_state = true; last_packet_state = true;
} }
printf("~~~1 buff in usrp write = %d\n", buff[0]); printf("~~~1 buff in usrp write = %p\n", buff[0]);
pthread_mutex_lock(&write_thread->mutex_write); pthread_mutex_lock(&write_thread->mutex_write);
end = write_thread->end; end = write_thread->end;
printf("package being write is %d\n", end); printf("package being write is %d\n", end);
...@@ -449,8 +449,9 @@ printf("package being write is %d\n", end); ...@@ -449,8 +449,9 @@ printf("package being write is %d\n", end);
write_package[end].cc = cc; write_package[end].cc = cc;
write_package[end].first_packet = first_packet_state; write_package[end].first_packet = first_packet_state;
write_package[end].last_packet = last_packet_state; write_package[end].last_packet = last_packet_state;
write_package[end].buff = buff; for (int i = 0; i < cc; i++)
printf("~~~2 write_package buff in usrp write = %d\n", write_package[end].buff[0]); write_package[end].buff[i] = buff[i];
printf("~~~2 write_package buff in usrp write = %p\n", write_package[end].buff[0]);
write_thread->instance_cnt_write = 0; write_thread->instance_cnt_write = 0;
write_thread->end = (write_thread->end + 1)% write_thread->num_package; write_thread->end = (write_thread->end + 1)% write_thread->num_package;
pthread_cond_signal(&write_thread->cond_write); pthread_cond_signal(&write_thread->cond_write);
...@@ -508,8 +509,8 @@ void *trx_usrp_write_thread(void * arg){ ...@@ -508,8 +509,8 @@ void *trx_usrp_write_thread(void * arg){
} }
pthread_mutex_unlock(&write_thread->mutex_write); pthread_mutex_unlock(&write_thread->mutex_write);
printf("end of write thread signal getting \n"); printf("end of write thread signal getting \n");
printf("~~~2.5 write_package buff in thread = %d\n", write_package[start].buff[0]); printf("~~~2.5 write_package buff in thread = %p\n", write_package[start].buff[0]);
printf("~~~3 buff in tx write thread= %d\n", buff[0]); printf("~~~3 buff in tx write thread= %p\n", buff[0]);
#if defined(__x86_64) || defined(__i386__) #if defined(__x86_64) || defined(__i386__)
#ifdef __AVX2__ #ifdef __AVX2__
......
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