Fixed cmake not linking fftw in mex

master
Ismael Gomez 9 years ago
parent 6e820a53d6
commit 7cce2467e2

@ -0,0 +1,21 @@
function [ s ] = bin2hex( in )
%BIN2HEX Summary of this function goes here
% Detailed explanation goes here
a=reshape(in,8,[]);
t=size(a);
s=cell(1,t(2));
nbit=2.^(7:-1:0);
for i=1:t(2)
s{i}=dec2hex(sum(nbit'.*double(a(:,i))));
end
for i=1:t(2)
if (length(s{i})==1)
fprintf('0%s ',s{i})
else
fprintf('%s ',s{i})
end
end
fprintf('\n');
end

@ -1,6 +1,6 @@
enb=struct('NCellID',0,'NDLRB',25,'NSubframe',4,'CFI',3,'CyclicPrefix','Normal','CellRefP',1,'Ng','One','PHICHDuration','Normal','DuplexMode','FDD'); enb=struct('NCellID',1,'NDLRB',25,'NSubframe',5,'CFI',2,'CyclicPrefix','Normal','CellRefP',1,'Ng','Sixth','PHICHDuration','Normal','DuplexMode','FDD');
RNTI=62; RNTI=65535;
addpath('../../build/srslte/lib/phch/test') addpath('../../build/srslte/lib/phch/test')
@ -11,8 +11,8 @@ cec.InterpType = 'linear'; % 2D interpolation type
cec.InterpWindow = 'Causal'; % Interpolation window type cec.InterpWindow = 'Causal'; % Interpolation window type
cec.InterpWinSize = 1; % Interpolation window size cec.InterpWinSize = 1; % Interpolation window size
subframe_rx=lteOFDMDemodulate(enb,x); %subframe_rx=lteOFDMDemodulate(enb,x);
%subframe_rx=reshape(input,[],14); subframe_rx=reshape(x,[],14);
[hest,nest] = lteDLChannelEstimate(enb, cec, subframe_rx); [hest,nest] = lteDLChannelEstimate(enb, cec, subframe_rx);
% Search PDCCH % Search PDCCH
@ -20,7 +20,7 @@ pdcchIndices = ltePDCCHIndices(enb);
[pdcchRx, pdcchHest] = lteExtractResources(pdcchIndices, subframe_rx, hest); [pdcchRx, pdcchHest] = lteExtractResources(pdcchIndices, subframe_rx, hest);
[dciBits, pdcchSymbols] = ltePDCCHDecode(enb, pdcchRx, pdcchHest, nest); [dciBits, pdcchSymbols] = ltePDCCHDecode(enb, pdcchRx, pdcchHest, nest);
pdcch = struct('RNTI', RNTI); pdcch = struct('RNTI', RNTI);
dci = ltePDCCHSearch(enb, pdcch, dciBits); % Search PDCCH for DCI [dci, dcidecBits] = ltePDCCHSearch(enb, pdcch, dciBits); % Search PDCCH for DCI
if ~isempty(dci) if ~isempty(dci)
@ -30,9 +30,8 @@ if ~isempty(dci)
% Get the PDSCH configuration from the DCI % Get the PDSCH configuration from the DCI
[pdsch, trblklen] = hPDSCHConfiguration(enb, dci, pdcch.RNTI); [pdsch, trblklen] = hPDSCHConfiguration(enb, dci, pdcch.RNTI);
pdsch.NTurboDecIts = 10; pdsch.NTurboDecIts = 10;
pdsch.Modulation = {'64QAM'}; %pdsch.Modulation = {'64QAM'};
pdsch.RV=0; pdsch.RV=0;
trblklen=14112;
fprintf('PDSCH settings after DCI decoding:\n'); fprintf('PDSCH settings after DCI decoding:\n');
disp(pdsch); disp(pdsch);
@ -45,9 +44,9 @@ if ~isempty(dci)
[sib1, crc] = lteDLSCHDecode(enb, pdsch, trblklen, dlschBits); [sib1, crc] = lteDLSCHDecode(enb, pdsch, trblklen, dlschBits);
%[dec2, data, pdschRx2, pdschSymbols2, e_bits] = srslte_pdsch(enb, pdsch, ... [dec2, data, pdschRx2, pdschSymbols2, e_bits] = srslte_pdsch(enb, pdsch, ...
% trblklen, ... trblklen, ...
% subframe_rx, hest, nest); subframe_rx, hest, 0);
scatter(real(pdschSymbols{1}),imag(pdschSymbols{1})) scatter(real(pdschSymbols{1}),imag(pdschSymbols{1}))

@ -80,6 +80,11 @@ target_link_libraries(srslte pthread m ${FFTW3F_LIBRARIES})
set_target_properties(srslte PROPERTIES set_target_properties(srslte PROPERTIES
VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}) VERSION ${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR})
if(NOT DisableMEX)
target_link_libraries(srslte_static ${FFTW3F_LIBRARIES})
endif(NOT DisableMEX)
if(RF_FOUND) if(RF_FOUND)
if(UHD_FOUND) if(UHD_FOUND)
target_link_libraries(srslte ${UHD_LIBRARIES}) target_link_libraries(srslte ${UHD_LIBRARIES})

Loading…
Cancel
Save