This commit is contained in:
ismagom 2015-12-04 11:41:28 +01:00
parent dcc36c6531
commit 815834f61b
2 changed files with 9 additions and 7 deletions

View File

@ -6,8 +6,8 @@
recordedSignal=[];
Npackets = 1;
SNR_values = 25;
Npackets = 5;
SNR_values = linspace(18,25,5);
%% Choose RMC
[waveform,rgrid,rmccFgOut] = lteRMCDLTool('R.9',[1;0;0;1]);
@ -79,8 +79,8 @@ for snr_idx=1:length(SNR_values)
%% Demodulate
frame_rx = lteOFDMDemodulate(rmccFgOut, rxWaveform);
%for sf_idx=0:Nsf-1
sf_idx=9;
for sf_idx=0:Nsf-1
% sf_idx=9;
subframe_rx=frame_rx(:,sf_idx*14+1:(sf_idx+1)*14);
rmccFgOut.NSubframe=sf_idx;
rmccFgOut.TotSubframes=1;
@ -107,7 +107,7 @@ for snr_idx=1:length(SNR_values)
fprintf('Error in sf=%d\n',sf_idx);
end
decoded_srslte(snr_idx) = decoded_srslte(snr_idx)+dec2;
%end
end
if ~isempty(recordedSignal)
recordedSignal = recordedSignal(flen*10+1:end);

View File

@ -254,7 +254,7 @@ int cuhd_open_(char *args, void **h, bool create_thread_gain, bool tx_gain_same_
return -1;
}
if (pthread_create(&handler->thread_gain, NULL, thread_gain_fcn, *h)) {
if (pthread_create(&handler->thread_gain, NULL, thread_gain_fcn, handler)) {
perror("pthread_create");
return -1;
}
@ -262,6 +262,7 @@ int cuhd_open_(char *args, void **h, bool create_thread_gain, bool tx_gain_same_
/* Find out if the master clock rate is configurable */
double cur_clock = handler->usrp->get_master_clock_rate();
printf("Trying to dynamically change Master clock...\n");
handler->usrp->set_master_clock_rate(cur_clock/2);
if (handler->usrp->get_master_clock_rate() == cur_clock) {
handler->dynamic_rate = false;
@ -271,10 +272,11 @@ int cuhd_open_(char *args, void **h, bool create_thread_gain, bool tx_gain_same_
fprintf(stderr, "Error: LTE sampling rates are not supported. Master clock rate is %.1f MHz\n", cur_clock/1e6);
return -1;
} else {
printf("Master clock rate is not configurable. Using default LTE sampling rates.\n");
printf("Master clock is not configurable. Using standard symbol sizes and sampling rates.\n");
srslte_use_standard_symbol_size(true);
}
} else {
printf("Master clock is configurable. Using reduced symbol sizes and sampling rates.\n");
handler->dynamic_rate = true;
}