Compare commits
33 Commits
65cef793ac
...
feature/ps
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
261984b30f | ||
|
|
472dcaf62f | ||
|
|
29a5afbf7e | ||
|
|
577a816dbf | ||
|
|
1b56b3c9ca | ||
|
|
4accb84e4a | ||
|
|
a5990ae650 | ||
|
|
c0b4435cd0 | ||
|
|
2d668be90f | ||
|
|
aba2f02820 | ||
|
|
dd79f8692a | ||
|
|
56d3dd647e | ||
|
|
a37ded1d73 | ||
|
|
7dd20a04fa | ||
|
|
8f2ae1ec4e | ||
|
|
4f5ac3b5f3 | ||
|
|
943b582d66 | ||
|
|
2428f5a861 | ||
|
|
f64f4fde31 | ||
|
|
22c51e1597 | ||
|
|
23a3503cb1 | ||
|
|
21c46dc45e | ||
|
|
99ffaa1bfc | ||
|
|
48bbb7102a | ||
|
|
b57260583a | ||
|
|
8839674480 | ||
|
|
005d488d79 | ||
|
|
baedad87fa | ||
|
|
19fd4dfb2d | ||
|
|
1622f922f9 | ||
|
|
041218aa7f | ||
|
|
d9f7798814 | ||
|
|
1ab873419e |
12
.gitignore
vendored
12
.gitignore
vendored
@@ -49,3 +49,15 @@ soc_rfsoc_top_sw_ert_rtw/
|
|||||||
# SimBiology backup files
|
# SimBiology backup files
|
||||||
*.sbproj.backup
|
*.sbproj.backup
|
||||||
*.sbproj.bak
|
*.sbproj.bak
|
||||||
|
|
||||||
|
/codegen_fracFdpw/fracF_dpw0_ert_rtw/
|
||||||
|
|
||||||
|
/codegen_fracFdpw/fracF_dpw0
|
||||||
|
|
||||||
|
/codegen_fracFdpw/FrFT_ert_rtw/
|
||||||
|
|
||||||
|
/codegen_fracFdpw/TBm_fracFdpw_ert_rtw/
|
||||||
|
|
||||||
|
/codegen_fracFdpw/FrFT
|
||||||
|
|
||||||
|
*.lock
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ Post Processing (PS)
|
|||||||
→ Host Communication / Processing / Visualization
|
→ Host Communication / Processing / Visualization
|
||||||
→ One DPW is a windows of FrameSize x nFrames samples
|
→ One DPW is a windows of FrameSize x nFrames samples
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Key Parameters
|
## Key Parameters
|
||||||
|
|||||||
279
codegen_fracFdpw/TBc_fracFdpwLFM.m
Normal file
279
codegen_fracFdpw/TBc_fracFdpwLFM.m
Normal file
@@ -0,0 +1,279 @@
|
|||||||
|
%% Test fracF_dpw using a physical LFM
|
||||||
|
%
|
||||||
|
% Parameters chosen to match previous FrFT validation work:
|
||||||
|
%
|
||||||
|
% Fs = 512 MHz
|
||||||
|
% T = 1 us
|
||||||
|
% B = 64 MHz
|
||||||
|
%
|
||||||
|
% Matched FrFT order:
|
||||||
|
%
|
||||||
|
% a = -(2/pi)*atan(Fs/(beta*T))
|
||||||
|
%
|
||||||
|
% where:
|
||||||
|
%
|
||||||
|
% beta = B/T
|
||||||
|
%
|
||||||
|
% Notes:
|
||||||
|
% - FFT is computed on the original (non-interpolated) signal.
|
||||||
|
% - FrFT is computed on the interpolated signal.
|
||||||
|
% - Power spectra are averaged across the entire DPW.
|
||||||
|
|
||||||
|
clearvars -except out
|
||||||
|
clc
|
||||||
|
close all
|
||||||
|
|
||||||
|
%% Signal parameters
|
||||||
|
|
||||||
|
N = 512;
|
||||||
|
Nframes = 1024;
|
||||||
|
|
||||||
|
Fs = single(512e6);
|
||||||
|
T = single(1e-6);
|
||||||
|
|
||||||
|
B = single(32e6);
|
||||||
|
beta = B/T;
|
||||||
|
|
||||||
|
%% Time axis
|
||||||
|
|
||||||
|
t = single((-N/2:N/2-1).') / Fs;
|
||||||
|
|
||||||
|
%% Generate LFM
|
||||||
|
|
||||||
|
x = exp(1j*pi*beta*(t.^2));
|
||||||
|
|
||||||
|
x = complex(single(real(x)), ...
|
||||||
|
single(imag(x)));
|
||||||
|
|
||||||
|
%% Create DPW
|
||||||
|
|
||||||
|
X = repmat(x,1,Nframes);
|
||||||
|
|
||||||
|
%% Interpolate exactly as Simulink
|
||||||
|
|
||||||
|
halfbandInterp = dsp.FIRHalfbandInterpolator;
|
||||||
|
|
||||||
|
Xint = halfbandInterp(X);
|
||||||
|
|
||||||
|
%% Matched FrFT order
|
||||||
|
|
||||||
|
aMatch = single(-(2/pi)*atan(Fs/(beta*T)));
|
||||||
|
|
||||||
|
fprintf('\n');
|
||||||
|
fprintf('Fs = %.3f MHz\n',double(Fs)/1e6);
|
||||||
|
fprintf('T = %.3f us\n',double(T)*1e6);
|
||||||
|
fprintf('B = %.3f MHz\n',double(B)/1e6);
|
||||||
|
fprintf('aMatch = %.6f\n',double(aMatch));
|
||||||
|
|
||||||
|
%% FFT reference
|
||||||
|
%
|
||||||
|
% FFT detector operates on the original non-interpolated signal.
|
||||||
|
|
||||||
|
FFTref = fftshift(fft(X,[],1),1)/N;
|
||||||
|
|
||||||
|
%% FrFT
|
||||||
|
%
|
||||||
|
% FrFT detector operates on the interpolated signal.
|
||||||
|
|
||||||
|
[Achirp,H,Cchirp,Aa] = fracF_init(aMatch);
|
||||||
|
|
||||||
|
Ffrft = fracF_dpw( ...
|
||||||
|
Xint,...
|
||||||
|
Achirp,...
|
||||||
|
H,...
|
||||||
|
Cchirp,...
|
||||||
|
Aa);
|
||||||
|
|
||||||
|
%% Mean power spectrum across the DPW
|
||||||
|
|
||||||
|
Pfft = mean(abs(FFTref).^2,2);
|
||||||
|
|
||||||
|
Pfrft = mean(abs(Ffrft).^2,2);
|
||||||
|
|
||||||
|
%% Peak comparison
|
||||||
|
|
||||||
|
peakFFT = max(Pfft);
|
||||||
|
peakFrFT = max(Pfrft);
|
||||||
|
|
||||||
|
gain_dB = 10*log10(double(peakFrFT/peakFFT));
|
||||||
|
|
||||||
|
fprintf('\n');
|
||||||
|
fprintf('FFT peak power : %.6f\n',double(peakFFT));
|
||||||
|
fprintf('FrFT peak power : %.6f\n',double(peakFrFT));
|
||||||
|
fprintf('Processing gain : %.3f dB\n',gain_dB);
|
||||||
|
|
||||||
|
%% Normalize spectra for display
|
||||||
|
|
||||||
|
Pfft_dB = 10*log10(Pfft/max(Pfft));
|
||||||
|
|
||||||
|
Pfrft_dB = 10*log10(Pfrft/max(Pfrft));
|
||||||
|
|
||||||
|
%% Display averaged spectra
|
||||||
|
|
||||||
|
figure
|
||||||
|
|
||||||
|
subplot(2,1,1)
|
||||||
|
|
||||||
|
plot(Pfft_dB)
|
||||||
|
|
||||||
|
grid on
|
||||||
|
|
||||||
|
ylim([-60 5])
|
||||||
|
|
||||||
|
title('FFT Mean Power Spectrum')
|
||||||
|
xlabel('FFT Bin')
|
||||||
|
ylabel('Power (dB)')
|
||||||
|
|
||||||
|
subplot(2,1,2)
|
||||||
|
|
||||||
|
plot(Pfrft_dB)
|
||||||
|
|
||||||
|
grid on
|
||||||
|
|
||||||
|
ylim([-60 5])
|
||||||
|
|
||||||
|
title(sprintf('FrFT Mean Power Spectrum (a = %.6f)', ...
|
||||||
|
double(aMatch)))
|
||||||
|
|
||||||
|
xlabel('FrFT Bin')
|
||||||
|
ylabel('Power (dB)')
|
||||||
|
|
||||||
|
%% Report peak locations
|
||||||
|
|
||||||
|
[~,idxFFT] = max(Pfft);
|
||||||
|
[~,idxFrFT] = max(Pfrft);
|
||||||
|
|
||||||
|
fprintf('\n');
|
||||||
|
fprintf('FFT peak bin : %d\n',idxFFT);
|
||||||
|
fprintf('FrFT peak bin : %d\n',idxFrFT);
|
||||||
|
fprintf('\n');
|
||||||
|
|
||||||
|
%% Compare TBc against TBm (optional)
|
||||||
|
%
|
||||||
|
% If the Simulink model has been executed and produced out.Fsim,
|
||||||
|
% compare both implementations.
|
||||||
|
|
||||||
|
if exist('out','var')
|
||||||
|
|
||||||
|
fprintf('\n');
|
||||||
|
fprintf('TBc vs TBm Comparison\n');
|
||||||
|
fprintf('---------------------\n');
|
||||||
|
|
||||||
|
Ftbm = out.Fsim;
|
||||||
|
|
||||||
|
%% Dimension check
|
||||||
|
|
||||||
|
fprintf('TBc size : [%d %d]\n', ...
|
||||||
|
size(Ffrft,1), size(Ffrft,2));
|
||||||
|
|
||||||
|
fprintf('TBm size : [%d %d]\n', ...
|
||||||
|
size(Ftbm,1), size(Ftbm,2));
|
||||||
|
|
||||||
|
assert(isequal(size(Ffrft),size(Ftbm)), ...
|
||||||
|
'TBc and TBm dimensions differ.');
|
||||||
|
|
||||||
|
%% Error metrics
|
||||||
|
|
||||||
|
err = Ftbm - Ffrft;
|
||||||
|
|
||||||
|
maxErr = max(abs(err(:)));
|
||||||
|
|
||||||
|
rmsErr = sqrt(mean(abs(err(:)).^2));
|
||||||
|
|
||||||
|
refPeak = max(abs(Ffrft(:)));
|
||||||
|
|
||||||
|
relErr = maxErr / refPeak;
|
||||||
|
|
||||||
|
%% Results
|
||||||
|
|
||||||
|
fprintf('\n');
|
||||||
|
fprintf('Reference peak : %.9g\n',double(refPeak));
|
||||||
|
fprintf('Maximum error : %.9g\n',double(maxErr));
|
||||||
|
fprintf('RMS error : %.9g\n',double(rmsErr));
|
||||||
|
fprintf('Relative error : %.9g\n',double(relErr));
|
||||||
|
|
||||||
|
if maxErr == 0
|
||||||
|
|
||||||
|
fprintf('\nPASS: Outputs are bit-identical.\n');
|
||||||
|
|
||||||
|
elseif relErr < 1e-5
|
||||||
|
|
||||||
|
fprintf('\nPASS: Outputs are numerically equivalent.\n');
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
fprintf('\nWARNING: Outputs differ.\n');
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
%% Visual comparison
|
||||||
|
|
||||||
|
frameIdx = 1;
|
||||||
|
|
||||||
|
figure
|
||||||
|
|
||||||
|
subplot(3,1,1)
|
||||||
|
|
||||||
|
plot(abs(Ffrft(:,frameIdx)))
|
||||||
|
|
||||||
|
grid on
|
||||||
|
|
||||||
|
title('TBc Output')
|
||||||
|
xlabel('Bin')
|
||||||
|
ylabel('|F|')
|
||||||
|
|
||||||
|
subplot(3,1,2)
|
||||||
|
|
||||||
|
plot(abs(Ftbm(:,frameIdx)))
|
||||||
|
|
||||||
|
grid on
|
||||||
|
|
||||||
|
title('TBm Output')
|
||||||
|
xlabel('Bin')
|
||||||
|
ylabel('|F|')
|
||||||
|
|
||||||
|
subplot(3,1,3)
|
||||||
|
|
||||||
|
plot(abs(Ftbm(:,frameIdx) - Ffrft(:,frameIdx)))
|
||||||
|
|
||||||
|
grid on
|
||||||
|
|
||||||
|
title('Absolute Error')
|
||||||
|
xlabel('Bin')
|
||||||
|
ylabel('|Error|')
|
||||||
|
|
||||||
|
%% Mean power spectrum comparison
|
||||||
|
|
||||||
|
Ptbc = mean(abs(Ffrft).^2,2);
|
||||||
|
|
||||||
|
Ptbm = mean(abs(Ftbm).^2,2);
|
||||||
|
|
||||||
|
Ptbc_dB = 10*log10(Ptbc/max(Ptbc));
|
||||||
|
|
||||||
|
Ptbm_dB = 10*log10(Ptbm/max(Ptbm));
|
||||||
|
|
||||||
|
figure
|
||||||
|
|
||||||
|
plot(Ptbc_dB,'LineWidth',1.5)
|
||||||
|
|
||||||
|
hold on
|
||||||
|
|
||||||
|
plot(Ptbm_dB,'--','LineWidth',1.5)
|
||||||
|
|
||||||
|
grid on
|
||||||
|
|
||||||
|
ylim([-60 5])
|
||||||
|
|
||||||
|
xlabel('Bin')
|
||||||
|
ylabel('Power (dB)')
|
||||||
|
|
||||||
|
title('TBc vs TBm Mean Power Spectrum')
|
||||||
|
|
||||||
|
legend('TBc','TBm')
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
fprintf('\n');
|
||||||
|
fprintf('TBm comparison skipped (out.Fsim not found).\n');
|
||||||
|
|
||||||
|
end
|
||||||
69
codegen_fracFdpw/TBc_fracFdpwNO.m
Normal file
69
codegen_fracFdpw/TBc_fracFdpwNO.m
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
%% fracF_dpw verification
|
||||||
|
%
|
||||||
|
% Verifies numerical equivalence between:
|
||||||
|
% - fracF_cg() : single-frame implementation
|
||||||
|
% - fracF_dpw() : DPW-aware implementation
|
||||||
|
%
|
||||||
|
% The test processes a full DPW of random complex data and compares the
|
||||||
|
% outputs sample-by-sample.
|
||||||
|
|
||||||
|
clear
|
||||||
|
clc
|
||||||
|
|
||||||
|
%% Test parameters
|
||||||
|
|
||||||
|
a = single(1);
|
||||||
|
|
||||||
|
N = 1024;
|
||||||
|
Nframes = 1024;
|
||||||
|
|
||||||
|
%% Precompute FrFT coefficients
|
||||||
|
|
||||||
|
[Achirp,H,Cchirp,Aa] = fracF_init(a);
|
||||||
|
|
||||||
|
%% Generate random complex DPW
|
||||||
|
|
||||||
|
X = complex( ...
|
||||||
|
randn(N,Nframes,'single'), ...
|
||||||
|
randn(N,Nframes,'single'));
|
||||||
|
|
||||||
|
%% DPW implementation
|
||||||
|
|
||||||
|
Fdpw = fracF_dpw( ...
|
||||||
|
X,...
|
||||||
|
Achirp,...
|
||||||
|
H,...
|
||||||
|
Cchirp,...
|
||||||
|
Aa);
|
||||||
|
|
||||||
|
%% Reference implementation
|
||||||
|
|
||||||
|
Fref = complex(zeros(512,Nframes,'single'));
|
||||||
|
|
||||||
|
for k = 1:Nframes
|
||||||
|
Fref(:,k) = fracF_cg(X(:,k),a);
|
||||||
|
end
|
||||||
|
|
||||||
|
%% Error metrics
|
||||||
|
|
||||||
|
err = Fdpw - Fref;
|
||||||
|
|
||||||
|
maxErr = max(abs(err(:)));
|
||||||
|
rmsErr = sqrt(mean(abs(err(:)).^2));
|
||||||
|
|
||||||
|
%% Results
|
||||||
|
|
||||||
|
fprintf('\n');
|
||||||
|
fprintf('FrFT DPW Verification\n');
|
||||||
|
fprintf('---------------------\n');
|
||||||
|
fprintf('Order (a) : %.6f\n',a);
|
||||||
|
fprintf('Frame size : %d\n',N);
|
||||||
|
fprintf('Number frames : %d\n',Nframes);
|
||||||
|
fprintf('Max error : %.9g\n',double(maxErr));
|
||||||
|
fprintf('RMS error : %.9g\n',double(rmsErr));
|
||||||
|
|
||||||
|
if maxErr == 0
|
||||||
|
fprintf('\nPASS: Outputs are bit-identical.\n');
|
||||||
|
else
|
||||||
|
fprintf('\nPASS: Outputs are numerically equivalent.\n');
|
||||||
|
end
|
||||||
BIN
codegen_fracFdpw/TBm_fracFdpw.slx
Normal file
BIN
codegen_fracFdpw/TBm_fracFdpw.slx
Normal file
Binary file not shown.
116
codegen_fracFdpw/fracF_dpw.m
Normal file
116
codegen_fracFdpw/fracF_dpw.m
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
function F = fracF_dpw(f,...
|
||||||
|
Achirp,...
|
||||||
|
H,...
|
||||||
|
Cchirp,...
|
||||||
|
Aa)
|
||||||
|
%#codegen
|
||||||
|
%% fracF_dpw Fractional Fourier Transform for an entire DPW
|
||||||
|
%
|
||||||
|
% F = fracF_dpw(f,Achirp,H,Cchirp,Aa)
|
||||||
|
%
|
||||||
|
% Computes the Fractional Fourier Transform (FrFT) of all frames in a
|
||||||
|
% Digital Processing Window (DPW) using a matrix-oriented implementation.
|
||||||
|
%
|
||||||
|
% The algorithm follows the same chirp-convolution-chirp formulation as
|
||||||
|
% fracF_cg(), but processes all DPW frames simultaneously. Each column of
|
||||||
|
% the input matrix is treated as an independent frame, following the same
|
||||||
|
% "columns are channels" convention used by DSP System Toolbox blocks.
|
||||||
|
%
|
||||||
|
% Processing chain:
|
||||||
|
%
|
||||||
|
% f
|
||||||
|
% ↓
|
||||||
|
% Achirp
|
||||||
|
% ↓
|
||||||
|
% Zero-pad
|
||||||
|
% ↓
|
||||||
|
% FFT
|
||||||
|
% ↓
|
||||||
|
% H
|
||||||
|
% ↓
|
||||||
|
% IFFT
|
||||||
|
% ↓
|
||||||
|
% Extract
|
||||||
|
% ↓
|
||||||
|
% Cchirp
|
||||||
|
% ↓
|
||||||
|
% Aa
|
||||||
|
% ↓
|
||||||
|
% F
|
||||||
|
%
|
||||||
|
% INPUTS
|
||||||
|
% f [1024 x Nframes] complex(single)
|
||||||
|
% Interpolated DPW. Each column corresponds to one frame.
|
||||||
|
%
|
||||||
|
% Achirp [1024 x 1] complex(single)
|
||||||
|
% Pre-multiplication chirp (A chirp).
|
||||||
|
%
|
||||||
|
% H [2048 x 1] complex(single)
|
||||||
|
% FFT of the convolution chirp (B chirp).
|
||||||
|
%
|
||||||
|
% Cchirp [512 x 1] complex(single)
|
||||||
|
% Post-multiplication chirp (C chirp).
|
||||||
|
%
|
||||||
|
% Aa scalar complex(single)
|
||||||
|
% FrFT amplitude factor (A_alpha).
|
||||||
|
%
|
||||||
|
% OUTPUT
|
||||||
|
% F [512 x Nframes] complex(single)
|
||||||
|
% FrFT result for all DPW frames.
|
||||||
|
%
|
||||||
|
% Notes
|
||||||
|
% - Input length is fixed at N = 1024 samples.
|
||||||
|
% - Output length is N/2 = 512 samples.
|
||||||
|
% - All DPW frames are processed simultaneously.
|
||||||
|
% - Numerically equivalent to applying fracF_cg() independently to
|
||||||
|
% each column of the input matrix.
|
||||||
|
% - Intended for code generation and RFSoC PS deployment.
|
||||||
|
%
|
||||||
|
% See also:
|
||||||
|
% fracF_init
|
||||||
|
% fracF_cg
|
||||||
|
|
||||||
|
%% Fixed transform dimensions
|
||||||
|
|
||||||
|
N = 1024;
|
||||||
|
Nfft = 2048;
|
||||||
|
|
||||||
|
%% DPW dimensions
|
||||||
|
|
||||||
|
Nframes = size(f,2);
|
||||||
|
|
||||||
|
%% Pre-multiplication chirp (A chirp)
|
||||||
|
|
||||||
|
g = f .* Achirp;
|
||||||
|
|
||||||
|
%% Zero-padding
|
||||||
|
%
|
||||||
|
% Extend each frame from N to Nfft samples to perform the linear
|
||||||
|
% convolution through frequency-domain multiplication.
|
||||||
|
|
||||||
|
g_pad = complex(zeros(Nfft,Nframes,'single'));
|
||||||
|
|
||||||
|
g_pad(1:N,:) = g;
|
||||||
|
|
||||||
|
%% Frequency-domain convolution
|
||||||
|
%
|
||||||
|
% Compute the convolution with the B chirp using the FFT method.
|
||||||
|
|
||||||
|
Gfft = fft(g_pad);
|
||||||
|
|
||||||
|
G = ifft(Gfft .* H);
|
||||||
|
|
||||||
|
%% Extract valid convolution region and decimate
|
||||||
|
%
|
||||||
|
% The Ozaktas formulation requires only the valid portion of the
|
||||||
|
% convolution result, followed by a factor-of-two decimation.
|
||||||
|
|
||||||
|
G_valid = G(N+1:2:end,:);
|
||||||
|
|
||||||
|
%% Post-multiplication chirp (C chirp)
|
||||||
|
%
|
||||||
|
% Apply the final chirp and amplitude factor to obtain the FrFT output.
|
||||||
|
|
||||||
|
F = Aa .* G_valid .* Cchirp;
|
||||||
|
|
||||||
|
end
|
||||||
115
codegen_fracFdpw/fracF_init.m
Normal file
115
codegen_fracFdpw/fracF_init.m
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
function [Achirp,H,Cchirp,Aa] = fracF_init(a)
|
||||||
|
%#codegen
|
||||||
|
%% fracF_init Precompute FrFT coefficients
|
||||||
|
%
|
||||||
|
% [Achirp,H,Cchirp,Aa] = fracF_init(a)
|
||||||
|
%
|
||||||
|
% Generates the constant coefficients required by the code-generation
|
||||||
|
% implementation of the Fractional Fourier Transform (FrFT).
|
||||||
|
%
|
||||||
|
% The implementation follows the chirp-convolution-chirp formulation:
|
||||||
|
%
|
||||||
|
% f(n)
|
||||||
|
% ↓
|
||||||
|
% Achirp
|
||||||
|
% ↓
|
||||||
|
% FFT
|
||||||
|
% ↓
|
||||||
|
% H = FFT(Bchirp)
|
||||||
|
% ↓
|
||||||
|
% IFFT
|
||||||
|
% ↓
|
||||||
|
% Cchirp
|
||||||
|
% ↓
|
||||||
|
% Aa
|
||||||
|
% ↓
|
||||||
|
% F_a(n)
|
||||||
|
%
|
||||||
|
% These coefficients depend only on the transform order 'a' and can
|
||||||
|
% therefore be computed once and reused for all frames within a DPW.
|
||||||
|
%
|
||||||
|
% INPUT
|
||||||
|
% a FrFT order (single)
|
||||||
|
%
|
||||||
|
% OUTPUTS
|
||||||
|
% Achirp [1024 x 1] pre-multiplication chirp (A chirp)
|
||||||
|
% H [2048 x 1] FFT of the convolution chirp (B chirp)
|
||||||
|
% Cchirp [512 x 1] post-multiplication chirp (C chirp)
|
||||||
|
% Aa scalar FrFT amplitude factor (A_alpha)
|
||||||
|
%
|
||||||
|
% Notes
|
||||||
|
% - Input length is assumed to be N = 1024 samples.
|
||||||
|
% - Output length is N/2 = 512 samples.
|
||||||
|
% - All outputs are returned as complex(single).
|
||||||
|
% - Intended for use with fracF_dpw().
|
||||||
|
%
|
||||||
|
% See also:
|
||||||
|
% fracF_dpw
|
||||||
|
|
||||||
|
%% Fixed transform dimensions
|
||||||
|
|
||||||
|
N = 1024;
|
||||||
|
|
||||||
|
%% Transform parameters
|
||||||
|
|
||||||
|
pi_s = single(pi);
|
||||||
|
|
||||||
|
phi = a * (pi_s/2);
|
||||||
|
|
||||||
|
tan_half_phi = tan(phi/2);
|
||||||
|
sin_phi = sin(phi);
|
||||||
|
cos_phi = cos(phi);
|
||||||
|
|
||||||
|
csc_phi = 1/sin_phi;
|
||||||
|
cot_phi = cos_phi/sin_phi;
|
||||||
|
|
||||||
|
two_delta = 2*sqrt(single(N)/2);
|
||||||
|
|
||||||
|
%% Pre-multiplication chirp (A chirp)
|
||||||
|
|
||||||
|
n = single((-N/2:N/2-1).') / two_delta;
|
||||||
|
|
||||||
|
Achirp = exp(-1j*pi_s*(n.^2)*tan_half_phi);
|
||||||
|
|
||||||
|
%% Convolution chirp (B chirp)
|
||||||
|
|
||||||
|
m = single((-N:N-1).') / two_delta;
|
||||||
|
|
||||||
|
Bchirp = exp(1j*pi_s*csc_phi*(m.^2));
|
||||||
|
|
||||||
|
%% Frequency-domain convolution kernel
|
||||||
|
%
|
||||||
|
% H corresponds to FFT(Bchirp) and is used in the frequency-domain
|
||||||
|
% implementation of the chirp convolution.
|
||||||
|
|
||||||
|
H = fft(Bchirp);
|
||||||
|
|
||||||
|
%% Post-multiplication chirp (C chirp)
|
||||||
|
%
|
||||||
|
% Since the implementation extracts every other sample from the valid
|
||||||
|
% convolution region, only the corresponding chirp samples are required.
|
||||||
|
|
||||||
|
Cchirp = Achirp(1:2:end);
|
||||||
|
|
||||||
|
%% FrFT amplitude factor (A_alpha)
|
||||||
|
|
||||||
|
Aa = sqrt(1 - 1j*cot_phi) / two_delta;
|
||||||
|
|
||||||
|
%% Force complex(single) outputs
|
||||||
|
%
|
||||||
|
% Explicit casting avoids unintended promotion to double precision and
|
||||||
|
% ensures deterministic code generation.
|
||||||
|
|
||||||
|
Achirp = complex(single(real(Achirp)), ...
|
||||||
|
single(imag(Achirp)));
|
||||||
|
|
||||||
|
H = complex(single(real(H)), ...
|
||||||
|
single(imag(H)));
|
||||||
|
|
||||||
|
Cchirp = complex(single(real(Cchirp)), ...
|
||||||
|
single(imag(Cchirp)));
|
||||||
|
|
||||||
|
Aa = complex(single(real(Aa)), ...
|
||||||
|
single(imag(Aa)));
|
||||||
|
|
||||||
|
end
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
%% FrFT Validation Script (Reference vs Original)
|
%% FrFT Validation Script (Reference vs Original)
|
||||||
% Author: Canisio Barth
|
% Author: Canisio Barth
|
||||||
|
|
||||||
clear; clc; close all;
|
clear; clc; close all;
|
||||||
|
|||||||
236
docs/img/resm_diagram.drawio
Normal file
236
docs/img/resm_diagram.drawio
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
<mxfile host="Electron">
|
||||||
|
<diagram name="Page-1" id="vQqRMeFAJ5lkNLsEcIIf">
|
||||||
|
<mxGraphModel dx="1951" dy="1211" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0" />
|
||||||
|
<mxCell id="1" parent="0" />
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-15" parent="1" style="swimlane;whiteSpace=wrap;html=1;" value="ZCU111-RFSoC" vertex="1">
|
||||||
|
<mxGeometry height="510" width="1280" x="90" y="120" as="geometry">
|
||||||
|
<mxRectangle height="30" width="80" x="90" y="120" as="alternateBounds" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-19" edge="1" parent="2rz5L2cFQ-K9zmRYuQ_V-15" source="MkqXqfyG2YaBNjo1GXRg-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.997;entryY=0.458;entryDx=0;entryDy=0;entryPerimeter=0;" target="MkqXqfyG2YaBNjo1GXRg-10">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="190" y="122" />
|
||||||
|
</Array>
|
||||||
|
<mxPoint x="190" y="122" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-21" connectable="0" parent="MkqXqfyG2YaBNjo1GXRg-19" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" value="I - 16bits" vertex="1">
|
||||||
|
<mxGeometry relative="1" x="-0.1666" as="geometry">
|
||||||
|
<mxPoint x="-12" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-13" edge="1" parent="2rz5L2cFQ-K9zmRYuQ_V-15" source="MkqXqfyG2YaBNjo1GXRg-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.013;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;dashed=1;dashPattern=8 4 1 4;" target="MkqXqfyG2YaBNjo1GXRg-12">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="-30" y="127" />
|
||||||
|
<mxPoint x="-30" y="376" />
|
||||||
|
</Array>
|
||||||
|
<mxPoint x="30" y="127" as="sourcePoint" />
|
||||||
|
<mxPoint x="30" y="376" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-16" connectable="0" parent="MkqXqfyG2YaBNjo1GXRg-13" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=14;" value="RF LOOPBACK" vertex="1">
|
||||||
|
<mxGeometry relative="1" x="0.0375" y="-4" as="geometry">
|
||||||
|
<mxPoint x="8" y="1" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-10" parent="2rz5L2cFQ-K9zmRYuQ_V-15" style="rounded=1;whiteSpace=wrap;html=1;points=[[0,0,0,0,0],[0,0.25,0,0,0],[0,0.5,0,0,0],[0,0.75,0,0,0],[0,1,0,0,0],[0.25,0,0,0,0],[0.25,1,0,0,0],[0.5,0,0,0,0],[0.5,1,0,0,0],[0.75,0,0,0,0],[0.75,1,0,0,0],[1,0,0,0,0],[1,0.25,0,0,0],[1,0.5,0,0,0],[1,0.59,0,0,0],[1,0.75,0,0,0],[1,1,0,0,0]];" value="DAC<div>Data clock = 128MHz</div><div>4 Samples/clock</div><div>BW = 512MHz</div><div>Interpolation = 8X</div><div>Fs = 4096MHz</div>" vertex="1">
|
||||||
|
<mxGeometry height="110" width="140" x="40" y="72" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-12" parent="2rz5L2cFQ-K9zmRYuQ_V-15" style="rounded=1;whiteSpace=wrap;html=1;" value="ADC<div>Fs = 4096MHz</div><div>Decimation = 8X</div><div>BW = 512MHz</div><div>4 Samples/clock</div><div>Data clock = 128MHz</div>" vertex="1">
|
||||||
|
<mxGeometry height="110" width="140" x="40" y="321" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-18" edge="1" parent="2rz5L2cFQ-K9zmRYuQ_V-15" source="MkqXqfyG2YaBNjo1GXRg-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.63;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.995;entryY=0.564;entryDx=0;entryDy=0;entryPerimeter=0;" target="MkqXqfyG2YaBNjo1GXRg-10">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="261" y="135" />
|
||||||
|
</Array>
|
||||||
|
<mxPoint x="340" y="138" as="sourcePoint" />
|
||||||
|
<mxPoint x="180" y="134" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-20" connectable="0" parent="MkqXqfyG2YaBNjo1GXRg-18" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" value="Q - 16bits" vertex="1">
|
||||||
|
<mxGeometry relative="1" x="-0.005" y="2" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-56" parent="2rz5L2cFQ-K9zmRYuQ_V-15" style="swimlane;whiteSpace=wrap;html=1;fillColor=none;swimlaneFillColor=none;dashed=1;" value="PL" vertex="1">
|
||||||
|
<mxGeometry height="460" width="490" x="325" y="37" as="geometry">
|
||||||
|
<mxRectangle height="30" width="140" x="415" y="157" as="alternateBounds" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-2" parent="MkqXqfyG2YaBNjo1GXRg-56" style="swimlane;whiteSpace=wrap;html=1;points=[[0,0,0,0,0],[0,0.25,0,0,0],[0,0.5,0,0,0],[0,0.63,0,0,0],[0,0.75,0,0,0],[0,1,0,0,0],[0.25,0,0,0,0],[0.25,1,0,0,0],[0.5,0,0,0,0],[0.5,1,0,0,0],[0.75,0,0,0,0],[0.75,1,0,0,0],[1,0,0,0,0],[1,0.25,0,0,0],[1,0.5,0,0,0],[1,0.75,0,0,0],[1,1,0,0,0]];" value="Tx Subsystem" vertex="1">
|
||||||
|
<mxGeometry height="100" width="190" x="16" y="35" as="geometry">
|
||||||
|
<mxRectangle height="30" width="120" x="220" y="70" as="alternateBounds" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-1" parent="MkqXqfyG2YaBNjo1GXRg-2" style="rounded=1;whiteSpace=wrap;html=1;" value="Pulsed LFM Generator" vertex="1">
|
||||||
|
<mxGeometry height="60" width="120" x="35" y="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-6" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-56" source="MkqXqfyG2YaBNjo1GXRg-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;dashed=1;dashPattern=8 8;startArrow=classic;startFill=1;endArrow=none;endFill=0;">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="345" y="93" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-5" parent="MkqXqfyG2YaBNjo1GXRg-56" style="swimlane;whiteSpace=wrap;html=1;startSize=23;" value="Rx Subsystem" vertex="1">
|
||||||
|
<mxGeometry height="190" width="458" x="16" y="246" as="geometry">
|
||||||
|
<mxRectangle height="70" width="138" x="432" y="276" as="alternateBounds" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-6" parent="MkqXqfyG2YaBNjo1GXRg-5" style="rounded=1;whiteSpace=wrap;html=1;" value="Debug Counter" vertex="1">
|
||||||
|
<mxGeometry height="45" width="50" x="9" y="139" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-37" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-5" source="MkqXqfyG2YaBNjo1GXRg-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0;entryDx=0;entryDy=0;" target="MkqXqfyG2YaBNjo1GXRg-31" value="">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-8" parent="MkqXqfyG2YaBNjo1GXRg-5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="PFB 512 Channels" vertex="1">
|
||||||
|
<mxGeometry height="60" width="66" x="174" y="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-38" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-5" source="MkqXqfyG2YaBNjo1GXRg-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=1;entryDx=0;entryDy=0;" target="MkqXqfyG2YaBNjo1GXRg-31" value="">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-9" parent="MkqXqfyG2YaBNjo1GXRg-5" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="Bypass<div>512 Samples</div>" vertex="1">
|
||||||
|
<mxGeometry height="60" width="66" x="174" y="122" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-39" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-5" source="MkqXqfyG2YaBNjo1GXRg-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" target="MkqXqfyG2YaBNjo1GXRg-36" value="">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-31" parent="MkqXqfyG2YaBNjo1GXRg-5" style="pointerEvents=1;verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;shape=mxgraph.electrical.electro-mechanical.twoWayContact2;elSwitchState=2;flipH=1;legacyAnchorPoints=0;" value="" vertex="1">
|
||||||
|
<mxGeometry height="30" width="75" x="266" y="92" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-36" parent="MkqXqfyG2YaBNjo1GXRg-5" style="rounded=1;whiteSpace=wrap;html=1;" value="DPW capture<div>N frames of 512 samples</div>" vertex="1">
|
||||||
|
<mxGeometry height="89" width="82" x="358" y="62.5" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-48" parent="MkqXqfyG2YaBNjo1GXRg-5" style="pointerEvents=1;verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;shape=mxgraph.electrical.electro-mechanical.twoWayContact2;elSwitchState=2;flipH=1;legacyAnchorPoints=0;flipV=1;" value="" vertex="1">
|
||||||
|
<mxGeometry height="30" width="75" x="59" y="89" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-49" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-5" style="endArrow=classic;html=1;rounded=0;" value="">
|
||||||
|
<mxGeometry height="50" relative="1" width="50" as="geometry">
|
||||||
|
<mxPoint x="5" y="89" as="sourcePoint" />
|
||||||
|
<mxPoint x="59" y="89" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-50" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.477;exitY=-0.01;exitDx=0;exitDy=0;entryX=1;entryY=0;entryDx=0;entryDy=0;exitPerimeter=0;">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="33" y="119" />
|
||||||
|
</Array>
|
||||||
|
<mxPoint x="33" y="138" as="sourcePoint" />
|
||||||
|
<mxPoint x="60" y="119" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-51" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="148" y="103.5" />
|
||||||
|
<mxPoint x="148" y="151.5" />
|
||||||
|
</Array>
|
||||||
|
<mxPoint x="134" y="103.5" as="sourcePoint" />
|
||||||
|
<mxPoint x="174.0000000000001" y="151.5" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-52" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=default;startArrow=classic;startFill=1;endArrow=none;endFill=0;" value="">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="148" y="60" />
|
||||||
|
<mxPoint x="148" y="89" />
|
||||||
|
</Array>
|
||||||
|
<mxPoint x="174" y="60" as="sourcePoint" />
|
||||||
|
<mxPoint x="148" y="122" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-22" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-56" source="MkqXqfyG2YaBNjo1GXRg-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.999;exitY=0.435;exitDx=0;exitDy=0;exitPerimeter=0;">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="7" y="332" />
|
||||||
|
</Array>
|
||||||
|
<mxPoint x="-143" y="331" as="sourcePoint" />
|
||||||
|
<mxPoint x="15" y="332" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-23" connectable="0" parent="MkqXqfyG2YaBNjo1GXRg-22" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" value="I - 16bits" vertex="1">
|
||||||
|
<mxGeometry relative="1" x="-0.1666" as="geometry">
|
||||||
|
<mxPoint x="14" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-24" edge="1" parent="MkqXqfyG2YaBNjo1GXRg-56" source="MkqXqfyG2YaBNjo1GXRg-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.998;exitY=0.545;exitDx=0;exitDy=0;exitPerimeter=0;">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="-144" y="344" as="sourcePoint" />
|
||||||
|
<mxPoint x="15" y="344" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="MkqXqfyG2YaBNjo1GXRg-25" connectable="0" parent="MkqXqfyG2YaBNjo1GXRg-24" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" value="Q - 16bits" vertex="1">
|
||||||
|
<mxGeometry relative="1" x="-0.005" y="2" as="geometry">
|
||||||
|
<mxPoint as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-1" parent="2rz5L2cFQ-K9zmRYuQ_V-15" style="swimlane;whiteSpace=wrap;html=1;" value="Shared Memory" vertex="1">
|
||||||
|
<mxGeometry height="460" width="160" x="860" y="37" as="geometry">
|
||||||
|
<mxRectangle height="30" width="130" x="950" y="157" as="alternateBounds" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-2" parent="2rz5L2cFQ-K9zmRYuQ_V-1" style="rounded=1;whiteSpace=wrap;html=1;" value="<div>DMA Engine</div><div>AXI-Stream to</div><div>&nbsp;AXI-MM</div>" vertex="1">
|
||||||
|
<mxGeometry height="204" width="120" x="20" y="246" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-3" parent="2rz5L2cFQ-K9zmRYuQ_V-1" style="rounded=1;whiteSpace=wrap;html=1;points=[[0,0,0,0,0],[0,0.25,0,0,0],[0,0.38,0,0,0],[0,0.5,0,0,0],[0,0.75,0,0,0],[0,1,0,0,0],[0.25,0,0,0,0],[0.25,1,0,0,0],[0.5,0,0,0,0],[0.5,1,0,0,0],[0.75,0,0,0,0],[0.75,1,0,0,0],[1,0,0,0,0],[1,0.25,0,0,0],[1,0.5,0,0,0],[1,0.75,0,0,0],[1,1,0,0,0]];" value="AXI-Lite<div>Memory Mapped</div><div>Registers</div>" vertex="1">
|
||||||
|
<mxGeometry height="120" width="120" x="20" y="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-8" edge="1" parent="2rz5L2cFQ-K9zmRYuQ_V-15" source="MkqXqfyG2YaBNjo1GXRg-36" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.526;entryDx=0;entryDy=0;entryPerimeter=0;" target="2rz5L2cFQ-K9zmRYuQ_V-2" value="">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-9" parent="2rz5L2cFQ-K9zmRYuQ_V-15" style="swimlane;whiteSpace=wrap;html=1;dashed=1;" value="PS" vertex="1">
|
||||||
|
<mxGeometry height="463" width="200" x="1070" y="37" as="geometry">
|
||||||
|
<mxRectangle height="30" width="60" x="1160" y="157" as="alternateBounds" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-10" parent="2rz5L2cFQ-K9zmRYuQ_V-9" style="rounded=1;whiteSpace=wrap;html=1;" value="<span style="background-color: transparent; color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));">Parameters</span><br><ul><li style="text-align: left;">Initialization</li><li style="text-align: left;">Configuration</li><li style="text-align: left;">Capture Control</li></ul>" vertex="1">
|
||||||
|
<mxGeometry height="120" width="120" x="40" y="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-12" parent="2rz5L2cFQ-K9zmRYuQ_V-9" style="rounded=1;whiteSpace=wrap;html=1;align=left;fillColor=#d5e8d4;strokeColor=#82b366;" value="<div style="text-align: center;"><span style="background-color: transparent; color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));">Data Processing</span></div><ul><li>DPW periodic read</li><li>Unpack samples</li><li>Convert to complex type</li><li>Reshape to DPW Matrix</li><li>Processing algorithm</li></ul>" vertex="1">
|
||||||
|
<mxGeometry height="238.5" width="160" x="20" y="201.5" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-4" edge="1" parent="2rz5L2cFQ-K9zmRYuQ_V-15" source="2rz5L2cFQ-K9zmRYuQ_V-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;dashPattern=8 8;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.38;exitDx=0;exitDy=0;exitPerimeter=0;" target="MkqXqfyG2YaBNjo1GXRg-2">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="580" y="140" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-7" connectable="0" parent="2rz5L2cFQ-K9zmRYuQ_V-4" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" value="<font style="font-size: 14px;">CONTROL</font><div><font style="font-size: 14px;">CONFIG</font></div>" vertex="1">
|
||||||
|
<mxGeometry relative="1" x="-0.1353" y="3" as="geometry">
|
||||||
|
<mxPoint x="6" y="-4" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-11" edge="1" parent="2rz5L2cFQ-K9zmRYuQ_V-15" source="2rz5L2cFQ-K9zmRYuQ_V-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;dashed=1;dashPattern=8 8;" target="2rz5L2cFQ-K9zmRYuQ_V-3">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-13" edge="1" parent="2rz5L2cFQ-K9zmRYuQ_V-15" source="2rz5L2cFQ-K9zmRYuQ_V-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" target="2rz5L2cFQ-K9zmRYuQ_V-12" value="">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-17" edge="1" parent="1" source="2rz5L2cFQ-K9zmRYuQ_V-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;startSize=6;jumpStyle=none;strokeWidth=6;exitX=0;exitY=0.25;exitDx=0;exitDy=0;" target="2rz5L2cFQ-K9zmRYuQ_V-9" value="<div><br></div><div><br></div>">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1480" y="390" as="sourcePoint" />
|
||||||
|
<mxPoint x="1360" y="395" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-18" connectable="0" parent="2rz5L2cFQ-K9zmRYuQ_V-17" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];rotation=0;" value="TCP-<span style="background-color: light-dark(#ffffff, var(--ge-dark-color, #121212)); color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));">IP</span>" vertex="1">
|
||||||
|
<mxGeometry relative="1" x="-0.2058" as="geometry">
|
||||||
|
<mxPoint y="25" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-16" parent="1" style="swimlane;whiteSpace=wrap;html=1;" value="Simulink" vertex="1">
|
||||||
|
<mxGeometry height="510" width="200" x="1480" y="120" as="geometry">
|
||||||
|
<mxRectangle height="30" width="90" x="1480" y="120" as="alternateBounds" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-19" parent="2rz5L2cFQ-K9zmRYuQ_V-16" style="rounded=1;whiteSpace=wrap;html=1;align=left;" value="<div style="text-align: center;"><span style="background-color: transparent; color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));">Parameters</span></div><ul><li>Constants</li><li>Switches</li><li>Slides</li><li>Gains</li></ul>" vertex="1">
|
||||||
|
<mxGeometry height="108" width="110" x="40" y="42" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="2rz5L2cFQ-K9zmRYuQ_V-21" parent="2rz5L2cFQ-K9zmRYuQ_V-16" style="rounded=1;whiteSpace=wrap;html=1;align=left;" value="<div style="text-align: center;"><span style="background-color: transparent; color: light-dark(rgb(0, 0, 0), rgb(255, 255, 255));">Data Visualization</span></div><div><ul><li style="text-align: center;">Spectrum viewer</li><li>Array plot</li><li>Time scope</li></ul></div>" vertex="1">
|
||||||
|
<mxGeometry height="230" width="160" x="20" y="230" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
||||||
3
docs/img/resm_diagram.svg
Normal file
3
docs/img/resm_diagram.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 536 KiB |
@@ -8,13 +8,22 @@
|
|||||||
|
|
||||||
The PS subsystem is responsible for:
|
The PS subsystem is responsible for:
|
||||||
|
|
||||||
- System initialization
|
* System initialization
|
||||||
- Configuring PL subsystems
|
* Configuring PL subsystems
|
||||||
- Triggering captures
|
* Triggering captures
|
||||||
- Receiving data via DMA
|
* Receiving data via DMA
|
||||||
- Preparing data for processing and visualization
|
* Preparing data for processing and visualization
|
||||||
|
|
||||||
The current implementation acts as a **placeholder for post-processing**, focusing on reliable data acquisition and host interaction.
|
The subsystem now includes an initial **FrFT-based processing chain** implemented in Simulink and targeted to the RFSoC Processing System (PS).
|
||||||
|
|
||||||
|
Current work focuses on:
|
||||||
|
|
||||||
|
* Algorithm validation
|
||||||
|
* Code generation
|
||||||
|
* Hardware integration
|
||||||
|
* Performance characterization
|
||||||
|
|
||||||
|
while maintaining reliable data acquisition and host interaction.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -22,31 +31,33 @@ The current implementation acts as a **placeholder for post-processing**, focusi
|
|||||||
|
|
||||||
### Control & Initialization
|
### Control & Initialization
|
||||||
|
|
||||||
- Configure PL parameters:
|
* Configure PL parameters:
|
||||||
- Tx waveform configuration
|
|
||||||
- Capture parameters (nFrames, etc.)
|
* Tx waveform configuration
|
||||||
- Initialize DMA and memory buffers
|
* Capture parameters (nFrames, etc.)
|
||||||
- Manage system startup
|
* Initialize DMA and memory buffers
|
||||||
|
* Manage system startup
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Trigger & Capture
|
### Trigger & Capture
|
||||||
|
|
||||||
- Generates capture trigger (software-controlled)
|
* Generates capture trigger (software-controlled)
|
||||||
- Controls DPW acquisition timing
|
* Controls DPW acquisition timing
|
||||||
- Each trigger initiates one DPW capture
|
* Each trigger initiates one DPW capture
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### DMA Handling
|
### DMA Handling
|
||||||
|
|
||||||
- AXI4-Stream → DMA (S2MM)
|
* AXI4-Stream → DMA (S2MM)
|
||||||
- Receives **128-bit stream** (4 samples per clock)
|
* Receives **128-bit stream** (4 samples per clock)
|
||||||
- Stores data in PS DDR memory
|
* Stores data in PS DDR memory
|
||||||
|
|
||||||
Configuration:
|
Configuration:
|
||||||
- Frame size: 512 samples
|
|
||||||
- nFrames: configurable (validated up to 1024)
|
* Frame size: 512 samples
|
||||||
|
* nFrames: configurable (validated up to 1024)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -54,9 +65,9 @@ Configuration:
|
|||||||
|
|
||||||
### Raw DMA Data
|
### Raw DMA Data
|
||||||
|
|
||||||
- Packed complex samples
|
* Packed complex samples
|
||||||
- 16-bit real + 16-bit imag per sample
|
* 16-bit real + 16-bit imag per sample
|
||||||
- 4 samples per 128-bit word
|
* 4 samples per 128-bit word
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -64,19 +75,135 @@ Configuration:
|
|||||||
|
|
||||||
Data is unpacked and reshaped into:
|
Data is unpacked and reshaped into:
|
||||||
|
|
||||||
```
|
```text
|
||||||
[FrameSize x nFrames x nTriggers]
|
[FrameSize x nFrames x nTriggers]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
or, for processing purposes,
|
||||||
|
|
||||||
|
```text
|
||||||
|
[FrameSize x nFrames]
|
||||||
|
```
|
||||||
|
|
||||||
|
representing a single DPW.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Processing Pipeline (Current)
|
## Processing Pipeline (Current)
|
||||||
|
|
||||||
|
```text
|
||||||
DMA
|
DMA
|
||||||
→ Unpack samples (I/Q separation)
|
↓
|
||||||
→ Convert to complex representation
|
Unpack samples (I/Q separation)
|
||||||
→ Reshape into 3D structure
|
↓
|
||||||
→ Visualization / basic analysis
|
Convert to complex representation
|
||||||
|
↓
|
||||||
|
Reshape into DPW matrix
|
||||||
|
↓
|
||||||
|
Processing Path Selection
|
||||||
|
|
||||||
|
Path A:
|
||||||
|
Polyphase Filter Bank (PFB)
|
||||||
|
↓
|
||||||
|
Power Spectrum
|
||||||
|
|
||||||
|
Path B:
|
||||||
|
FFT
|
||||||
|
↓
|
||||||
|
Power Spectrum
|
||||||
|
|
||||||
|
Path C:
|
||||||
|
FrFT
|
||||||
|
↓
|
||||||
|
Mean Power Spectrum
|
||||||
|
|
||||||
|
↓
|
||||||
|
Visualization / Analysis
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## FrFT Processing Status
|
||||||
|
|
||||||
|
A first FrFT processing implementation has been integrated into the PS subsystem.
|
||||||
|
|
||||||
|
### Processing Flow
|
||||||
|
|
||||||
|
```text
|
||||||
|
DPW [512 x nFrames]
|
||||||
|
↓
|
||||||
|
Halfband Interpolation (2x)
|
||||||
|
↓
|
||||||
|
FrFT Coefficient Generation
|
||||||
|
↓
|
||||||
|
DPW-Aware FrFT Processing
|
||||||
|
↓
|
||||||
|
Mean Power Spectrum
|
||||||
|
```
|
||||||
|
|
||||||
|
### Software Structure
|
||||||
|
|
||||||
|
```text
|
||||||
|
codegen_fracFdpw/
|
||||||
|
│
|
||||||
|
├── fracF_init.m
|
||||||
|
├── fracF_dpw.m
|
||||||
|
├── TBc_fracFdpw.m
|
||||||
|
└── TBm_fracFdpw.slx
|
||||||
|
```
|
||||||
|
|
||||||
|
### Validation Completed
|
||||||
|
|
||||||
|
* DPW-aware FrFT implementation created
|
||||||
|
* Verified against original `fracF_cg`
|
||||||
|
* Bit-identical equivalence achieved
|
||||||
|
* MATLAB testbench (TBc) created
|
||||||
|
* Simulink model testbench (TBm) created
|
||||||
|
* TBc ↔ TBm comparison automated
|
||||||
|
* Bit-identical TBc ↔ TBm validation achieved
|
||||||
|
* Standalone subsystem code generation validated
|
||||||
|
* RFSoC PS integration completed
|
||||||
|
|
||||||
|
### Current Status
|
||||||
|
|
||||||
|
The implementation is functionally correct and integrated into the RFSoC processing chain.
|
||||||
|
|
||||||
|
Current work is focused on:
|
||||||
|
|
||||||
|
* Performance characterization
|
||||||
|
* FrFT parameter optimization
|
||||||
|
* Realistic pulse processing scenarios
|
||||||
|
|
||||||
|
### Open Technical Questions
|
||||||
|
|
||||||
|
The matched-order formulation used in the SPL simulations assumed:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Observation Window = Pulse Duration
|
||||||
|
```
|
||||||
|
|
||||||
|
The receiver currently operates under a different condition:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Observation Window < Pulse Duration
|
||||||
|
```
|
||||||
|
|
||||||
|
where only a portion of the pulse is processed by the FrFT.
|
||||||
|
|
||||||
|
Additional investigation is required to determine:
|
||||||
|
|
||||||
|
* Optimal FrFT order for partial-pulse observations
|
||||||
|
* Practical DPW sizes
|
||||||
|
* Trade-off between concentration and processing load
|
||||||
|
* Deviation from idealized SPL simulation conditions
|
||||||
|
|
||||||
|
### Current Limitations
|
||||||
|
|
||||||
|
* Coefficients are regenerated every execution
|
||||||
|
* No coefficient caching implemented
|
||||||
|
* No NEON-specific optimization
|
||||||
|
* Generated FFT kernels are used
|
||||||
|
* Performance scales strongly with DPW size
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -84,30 +211,43 @@ DMA
|
|||||||
|
|
||||||
Uses counter-based validation:
|
Uses counter-based validation:
|
||||||
|
|
||||||
- Real part → sample counter
|
* Real part → sample counter
|
||||||
- Imag part → frame index
|
* Imag part → frame index
|
||||||
|
|
||||||
Enables verification of:
|
Enables verification of:
|
||||||
|
|
||||||
- Data continuity
|
* Data continuity
|
||||||
- Frame alignment
|
* Frame alignment
|
||||||
- Correct ordering from DMA
|
* Correct ordering from DMA
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Execution Model
|
## Execution Model
|
||||||
|
|
||||||
- Triggered (event-based)
|
* Triggered (event-based)
|
||||||
- Burst capture (DPW)
|
* Burst capture (DPW)
|
||||||
- Not continuous real-time streaming
|
* Not continuous real-time streaming
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Performance Notes
|
## Performance Notes
|
||||||
|
|
||||||
- Designed for correctness and validation (not optimized)
|
Current implementation prioritizes correctness and validation over optimization.
|
||||||
- Bottleneck: unpacking + data movement
|
|
||||||
- Full-rate continuous processing not supported
|
Observations from RFSoC integration:
|
||||||
|
|
||||||
|
* FrFT processing successfully executes on the RFSoC PS
|
||||||
|
* nFrames = 64 executes responsively
|
||||||
|
* nFrames = 1024 remains computationally expensive
|
||||||
|
* Processing load scales approximately linearly with DPW size
|
||||||
|
* Code generation and subsystem integration have been validated
|
||||||
|
|
||||||
|
Current optimization candidates:
|
||||||
|
|
||||||
|
* Coefficient caching when FrFT order remains unchanged
|
||||||
|
* NEON vectorization
|
||||||
|
* Alternative FFT implementations
|
||||||
|
* DPW size optimization
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -115,26 +255,40 @@ Enables verification of:
|
|||||||
|
|
||||||
The PS currently serves as:
|
The PS currently serves as:
|
||||||
|
|
||||||
- Control interface
|
* Control interface
|
||||||
- Data acquisition manager
|
* Data acquisition manager
|
||||||
- Pre-processing stage
|
* Signal processing platform
|
||||||
|
* Algorithm development and validation environment
|
||||||
|
|
||||||
Future implementations will replace the current processing with advanced algorithms (e.g., FrFT).
|
Current processing capabilities include:
|
||||||
|
|
||||||
|
* PFB-based spectral analysis
|
||||||
|
* FFT-based spectral analysis
|
||||||
|
* FrFT-based spectral analysis
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Future Work
|
## Future Work
|
||||||
|
|
||||||
- FrFT-based processing
|
### FrFT
|
||||||
- Timestamp integration
|
|
||||||
- UDP streaming
|
* Matched-order optimization for realistic pulse captures
|
||||||
- Optimization (NEON / vectorization)
|
* Performance profiling on RFSoC PS
|
||||||
- Metadata extraction (move complexity to PL)
|
* Coefficient caching
|
||||||
|
* NEON optimization
|
||||||
|
* Detection processing after FrFT concentration
|
||||||
|
|
||||||
|
### System
|
||||||
|
|
||||||
|
* Timestamp integration
|
||||||
|
* UDP streaming
|
||||||
|
* Metadata extraction
|
||||||
|
* Migration of computationally intensive functions to PL where appropriate
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🔗 Related Components
|
## 🔗 Related Components
|
||||||
|
|
||||||
- [🏠 Project Home](../README.md)
|
* [🏠 Project Home](../README.md)
|
||||||
- [PL Tx Subsystem](pl_tx_subsystem.md)
|
* [PL Tx Subsystem](pl_tx_subsystem.md)
|
||||||
- [PL Rx Subsystem](pl_rx_subsystem.md)
|
* [PL Rx Subsystem](pl_rx_subsystem.md)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info Ref="codegen_fracFdpw" Type="Relative"/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="1617913e-1a81-4c05-b67f-42a35e5cd27b" type="Reference"/>
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info Ref="codegen_frft/codegen/mex/fracF_cg/interface" Type="Relative"/>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info location="4a7e46c8-b608-4097-9e1f-6b08f40b724c" type="Reference"/>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info Ref="codegen_frft/codegen" Type="Relative"/>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info location="7593a6a4-6687-4364-8723-1bc8794d0177" type="Reference"/>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info Ref="codegen_frft/codegen/mex" Type="Relative"/>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info location="732585ee-100e-439f-988e-c97de5008a4c" type="Reference"/>
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info Ref="docs/img" Type="Relative"/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="b625fd14-7cc4-44f4-ae1d-f8256f11241a" type="Reference"/>
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info location="a92ac691-f104-48a3-8517-c0b00eec410f" type="Reference"/>
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="c2875307-deb1-4e40-b64d-d77c1eb908cb" type="Reference"/>
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info Ref="codegen_frft/codegen/mex/fracF_cg" Type="Relative"/>
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Info location="81080468-b05c-494e-b13d-b9983b9ef350" type="Reference"/>
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="resm_diagram.svg" type="File"/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="resm_diagram.drawio" type="File"/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="1" type="DIR_SIGNIFIER"/>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info>
|
||||||
|
<Category UUID="FileClassCategory">
|
||||||
|
<Label UUID="design"/>
|
||||||
|
</Category>
|
||||||
|
</Info>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="fracF_dpw.m" type="File"/>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info>
|
||||||
|
<Category UUID="FileClassCategory">
|
||||||
|
<Label UUID="design"/>
|
||||||
|
</Category>
|
||||||
|
</Info>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="TBc_fracFdpwLFM.m" type="File"/>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info>
|
||||||
|
<Category UUID="FileClassCategory">
|
||||||
|
<Label UUID="design"/>
|
||||||
|
</Category>
|
||||||
|
</Info>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="TBm_fracFdpw.slx" type="File"/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="1" type="DIR_SIGNIFIER"/>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info>
|
||||||
|
<Category UUID="FileClassCategory">
|
||||||
|
<Label UUID="design"/>
|
||||||
|
</Category>
|
||||||
|
</Info>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="fracF_init.m" type="File"/>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info>
|
||||||
|
<Category UUID="FileClassCategory">
|
||||||
|
<Label UUID="design"/>
|
||||||
|
</Category>
|
||||||
|
</Info>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="TBc_fracFdpwNO.m" type="File"/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="codegen_fracFdpw" type="File"/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info/>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Info location="img" type="File"/>
|
||||||
Binary file not shown.
@@ -25,7 +25,7 @@ NCOCountIncDT = numerictype(1,NCOAccumWL*2,NCOAccumWL);
|
|||||||
|
|
||||||
% Pulse start/end frequencies
|
% Pulse start/end frequencies
|
||||||
pulseCentFreq = 0e6;
|
pulseCentFreq = 0e6;
|
||||||
pulseBw = 50e6; % Pulse bandwidth
|
pulseBw = 32e6; % Pulse bandwidth
|
||||||
|
|
||||||
% Number of pulses
|
% Number of pulses
|
||||||
numPulses = 10;
|
numPulses = 10;
|
||||||
@@ -34,9 +34,10 @@ numPulses = 10;
|
|||||||
PRF = 7.5e3;
|
PRF = 7.5e3;
|
||||||
PRI = 1/PRF;
|
PRI = 1/PRF;
|
||||||
|
|
||||||
|
|
||||||
% Pulse time duration
|
% Pulse time duration
|
||||||
%pulseT = 10; % use very long pulse help emulate CW
|
pulseT = 10; % use very long pulse help emulate CW
|
||||||
pulseT = 10e-6;
|
%pulseT = 10e-6;
|
||||||
|
|
||||||
% CW mode (bypass pulse generation)
|
% CW mode (bypass pulse generation)
|
||||||
%CwMode = false;
|
%CwMode = false;
|
||||||
@@ -53,10 +54,10 @@ bd = bdroot; % Retrive which model is calling this function
|
|||||||
switch bd
|
switch bd
|
||||||
case 'soc_rfsoc_top'
|
case 'soc_rfsoc_top'
|
||||||
TsSW = 0.0005; % Signal generator and capture update rate
|
TsSW = 0.0005; % Signal generator and capture update rate
|
||||||
StopTime = 0.0025; % Simulation total time
|
StopTime = 0.025; % Simulation total time
|
||||||
case 'gm_soc_rfsoc_top_sw'
|
case 'gm_soc_rfsoc_top_sw'
|
||||||
TsSW = 0.5;
|
TsSW = 0.25;
|
||||||
StopTime = 10;
|
StopTime = 250;
|
||||||
otherwise
|
otherwise
|
||||||
error('rfsoc_init: InvalidModel (%s not supported).', bd);
|
error('rfsoc_init: InvalidModel (%s not supported).', bd);
|
||||||
end
|
end
|
||||||
@@ -82,8 +83,16 @@ channelizerCoeffs = channelizer.coeffs.Numerator;
|
|||||||
%Starting frequency for each channel
|
%Starting frequency for each channel
|
||||||
%chanFStart = chanBW/2:chanBW:(fs/2-chanBW/2);
|
%chanFStart = chanBW/2:chanBW:(fs/2-chanBW/2);
|
||||||
|
|
||||||
%Number of frames in the DPW
|
%% Frame and DPW capture parameters
|
||||||
nFrames = 1024;%nChan/SamplesPerCycle;
|
samplesFrame = 512; % number of samples in one frame
|
||||||
|
|
||||||
|
TFrame = samplesFrame*Ts_eff; % time duration of a frame
|
||||||
|
|
||||||
|
%Number of frames in the DPW
|
||||||
|
nFrames = 64;
|
||||||
|
|
||||||
|
%% FrFT tests
|
||||||
|
pulseBeta = pulseBw/pulseT; % chirp-rate in Hz/s
|
||||||
|
|
||||||
|
aMatch = -(2/pi)*(atan(fs_eff/(pulseBeta*TFrame)));
|
||||||
|
|
||||||
% Frame size after serializing x2
|
|
||||||
%frameSize = SamplesPerCycle/2;
|
|
||||||
@@ -1,8 +1,24 @@
|
|||||||
%% Startup Tasks
|
%% Startup Tasks
|
||||||
%
|
%
|
||||||
% Configure HDL Coder to use Xilinx Vivado for HDL workflows.
|
% Configure HDL Coder to use Xilinx Vivado for HDL workflows
|
||||||
|
% only when Vivado is installed on this machine.
|
||||||
%
|
%
|
||||||
hdlsetuptoolpath('ToolName','Xilinx Vivado', ...
|
|
||||||
'ToolPath','/tools/Xilinx/Vivado/2024.1/bin/vivado');
|
|
||||||
|
|
||||||
%%
|
vivadoPath = '/tools/Xilinx/Vivado/2024.1/bin/vivado';
|
||||||
|
|
||||||
|
if exist(vivadoPath, 'file') == 2
|
||||||
|
|
||||||
|
hdlsetuptoolpath( ...
|
||||||
|
'ToolName', 'Xilinx Vivado', ...
|
||||||
|
'ToolPath', vivadoPath);
|
||||||
|
|
||||||
|
fprintf('[FrFT Project] Vivado detected. HDL workflow enabled.\n');
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
warning([ ...
|
||||||
|
'[FrFT Project] Vivado not found.\n' ...
|
||||||
|
'HDL synthesis / bitstream generation disabled.\n' ...
|
||||||
|
'Project running in MATLAB/Simulink modeling-only mode.']);
|
||||||
|
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user