%% Derived from preload fs_eff = fs_RF/IntDecFactor; % Effective fs before interpolation / after decimation Ts_eff = 1/fs_eff; %% Host Sample Time in Simulation %TsHost = 5e-5; FPGAClkRate = fs_eff/SamplesPerCycle; TsFPGA = 1/FPGAClkRate; %% Tx signal generator parameters % NCO accumulator word length NCOAccumWL = 16; % NCO phase increment scale factor NCOIncScale = Ts_eff*2^NCOAccumWL; % NCO phase increments datatype NCOIncDT = numerictype(1,NCOAccumWL,0); % NCO counter increment datatype NCOCountIncDT = numerictype(1,NCOAccumWL*2,NCOAccumWL); %% Test signal parameters % Pulse start/end frequencies pulseCentFreq = 0e6; pulseBw = 32e6; % Pulse bandwidth % Number of pulses numPulses = 10; % Pulse repetition interval PRF = 7.5e3; PRI = 1/PRF; % Pulse time duration pulseT = 10; % use very long pulse help emulate CW %pulseT = 10e-6; % CW mode (bypass pulse generation) %CwMode = false; % Counter mode (bypass pulse and CW generation) %CounterMode = true; % Output gain pulseGenGain = 1; %% Simulation/External Mode parameters (conditional) bd = bdroot; % Retrive which model is calling this function switch bd case 'soc_rfsoc_top' TsSW = 0.0005; % Signal generator and capture update rate StopTime = 0.025; % Simulation total time case 'gm_soc_rfsoc_top_sw' TsSW = 0.25; StopTime = 250; otherwise error('rfsoc_init: InvalidModel (%s not supported).', bd); end %% Channelizer parameters %Number of channels, maximally decimated channelizer M/D=1 nChan = 512; %Taps per band nTapsPerBand = 16; %Create channelizer object channelizer = dsp.Channelizer('NumFrequencyBands',nChan,... 'DecimationFactor',nChan,... 'NumTapsPerBand',nTapsPerBand); %Channelizer coefficients channelizerCoeffs = channelizer.coeffs.Numerator; %Channel bandwidth %chanBW = fs/nChan; %Starting frequency for each channel %chanFStart = chanBW/2:chanBW:(fs/2-chanBW/2); %% Frame and DPW capture parameters 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)));