Commit 296a69d0 authored by Mark Ruzindana's avatar Mark Ruzindana
Browse files

Pinned memory, streams and events implemented.

parent 6ce42dee
......@@ -44,7 +44,7 @@ sigma2 = kb*Tsys*BW; % Noise power per channel
% 8 -> Send exponentially correlated noise.
% 9 -> Send pulsar data
% else -> Send all zeros
data_flag = 8;
data_flag = 9;
% Sinusoid parameters (only used if data_flag = 2)
% It should be noted that the phase of the sinusoid will not change between
......@@ -160,8 +160,8 @@ CEN_N = 4000;
CEN = CEN_Asqr/sqrt(2)*(randn(Ninputs, CEN_N) + 1j*randn(Ninputs, CEN_N));
CEN_R = 1/CEN_N*(CEN*CEN');
figure(99);
imagesc(abs(CEN_R));
% figure(99);
% imagesc(abs(CEN_R));
c_max = 4;
c_min = -4;
......@@ -173,7 +173,7 @@ CEN_imag = int8(((imag(CEN) - c_min)/(c_max - c_min) - 0.5) * 256);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Increase the range of tau when dispersion measure causes m_D to exceed
% time samples.
D = 10; % Dispersion measure
D = 10; % 20; % Dispersion measure
% freq = (0:499)*(303e3) + 1300e6; % All frequencies
% freq = (0:399)*(303e3) + 1300e6; % All frequencies
% No scalloping %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......@@ -384,8 +384,8 @@ for mcnt = [0:401,800,1200,1600,2000] % [0:801,1200,1600,2000,2400] % No scallo
t_idxs = mod(mcnt*20 + 1:(mcnt+1)*20, Ntime);
t_idxs(t_idxs == 0) = Ntime;
f_idxs = (fid - 1)*8+1:fid*8;
% freq_idxs = 5*(xid-1) + [1:5, 101:105, 201:205, 301:305, 401:405];
freq_idxs = 5*(xid-1) + [1:5, 101:105, 201:205, 301:305];
freq_idxs = 5*(xid-1) + [1:5, 101:105, 201:205, 301:305, 401:405];
% freq_idxs = 5*(xid-1) + [1:5, 101:105, 201:205, 301:305];
tmp = pulseData(f_idxs, freq_idxs, t_idxs);
data(:,1,:,:) = real(tmp);
data(:,2,:,:) = imag(tmp);
......
fs = 155e6; % Sampling frequency - used for noise level
Ninputs = 40; % Number of inputs/antennas
Nbins = 400; % Total number of frequency bins
Nbins = 500; %400; % Total number of frequency bins
Nfft = 512; % F-engine FFT size
Nfengines = 5; % Number of F-engines
Nxengines = 20; % Number of X-engines (i.e. Number of GPUs)
......@@ -8,12 +8,13 @@ Nxengines = 20; % Number of X-engines (i.e. Number of GPUs)
Nin_per_f = Ninputs/Nfengines; % Number of inputs per F-engine
Nbin_per_x = Nbins/Nxengines; % Number of bins per X-engine
Ntime_per_packet = 20; % Number of time samples (spectra snapshots) per packet
Ntime = 8000;
Ntime = 4000; % 8000;
% Increase the range of tau when dispersion measure causes m_D to exceed
% time samples.
D = 10; % DM; 10 with these parameters gives a fairly fast pulsar
freq = (0:399)*(303e3) + 1300e6; % All frequencies
D = 20; % DM; 10 with these parameters gives a fairly fast pulsar
freq = (0:499)*(303e3) + 1300e6; % All frequencies
% freq = (0:399)*(303e3) + 1300e6; % All frequencies
% fo = freq(floor(length(freq)/2)); % Center frequency
% tau = 4.1488e-3*((fo^-2)-(freq.^-2))*D; % Frequency dependent timing offset
% t = -2.8e-20:((2.5e-20)+(2.8e-20))/(Ntime-1):2.5e-20; % Range of timing offsets
......@@ -77,19 +78,23 @@ figure(10);
imagesc(squeeze(abs(pulseData(20,:,:))));
% imagesc(abs(exp(1j*phi)));
wei = ones(40,400,14);
bf_data = zeros(8000,400,14);
% wei = ones(40,400,14);
% bf_data = zeros(8000,400,14);
wei = ones(40,500,14);
bf_data = zeros(4000,500,14);
for b = 1:14
for f = 1:400
for f = 1:500
w = wei(:,f,b);
xn = squeeze(pulseData(:,f,:));
bf_data(:,f,b) = w'*xn;
end
end
bf_sti = zeros(100,20,14);
% bf_sti = zeros(100,20,14);
bf_sti = zeros(100,25,14);
for k = 1:100
bf_sti(k,:,:) = mean(bf_data(1+(k-1)*40:k*40,1:20,:),1);
% bf_sti(k,:,:) = mean(bf_data(1+(k-1)*40:k*40,1:20,:),1);
bf_sti(k,:,:) = mean(bf_data(1+(k-1)*40:k*40,1:25,:),1);
end
figure(12);
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?><SharedRoot><SharedProperty id="" value=""/></SharedRoot>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="completion_proposal_size">
</section>
<section name="org.eclipse.cdt.ui.text.hover.CMacroExpansionExploration">
</section>
</section>
eclipse.preferences.version=1
org.eclipse.cdt.debug.core.cDebug.default_source_containers=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<sourceLookupDirector>\n<sourceContainers duplicates\="false">\n<container memento\="AbsolutePath" typeId\="org.eclipse.cdt.debug.core.containerType.absolutePath"/>\n<container memento\="programRelativePath" typeId\="org.eclipse.cdt.debug.core.containerType.programRelativePath"/>\n<container memento\="&lt;?xml version\=&quot;1.0&quot; encoding\=&quot;UTF-8&quot; standalone\=&quot;no&quot;?&gt;&\#10;&lt;project referencedProjects\=&quot;true&quot;/&gt;&\#10;" typeId\="org.eclipse.cdt.debug.core.containerType.project"/>\n</sourceContainers>\n</sourceLookupDirector>\n
eclipse.preferences.version=1
spelling_locale_initialized=true
useAnnotationsPrefPage=true
useQuickDiffPrefPage=true
//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.applicationLaunchType=com.nvidia.cuda.ide.debug.launchApplicationDelegate,debug,;com.nvidia.cuda.ide.debug.launchApplicationDelegate,run,;
//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.attachLaunchType=com.nvidia.cuda.ide.debug.launch.attachCLaunch,debug,;
//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.postmortemLaunchType=com.nvidia.cuda.ide.debug.coreCLaunch,debug,;
//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.remoteApplicationLaunchType=com.nvidia.cuda.ide.remote.cudagdbserverrun,debug,;com.nvidia.cuda.ide.remote.cudagdbserverrun,run,;
eclipse.preferences.version=1
eclipse.preferences.version=1
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\n<launchPerspectives/>\n
preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget|
eclipse.preferences.version=1
org.eclipse.rse.systemtype.local.systemType.defaultUserId=mruzinda
useridperkey=flag1.Local\=mruzinda;
eclipse.preferences.version=1
org.eclipse.rse.preferences.order.connections=flag1.Local
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