diff --git a/chirp_block/TBm_chirp.slx b/chirp_block/TBm_chirp.slx new file mode 100644 index 0000000..d087b0f Binary files /dev/null and b/chirp_block/TBm_chirp.slx differ diff --git a/chirp_block/soc_resm_init.m b/chirp_block/soc_resm_init.m new file mode 100644 index 0000000..2f475c3 --- /dev/null +++ b/chirp_block/soc_resm_init.m @@ -0,0 +1,122 @@ +%% Rate setup +fs = 4096e6; +Ts = 1/fs; + +%% Host Sample Time in Simulation +TsHost = 5e-5; + +SamplesPerCycle = 16; + +FPGAClkRate = fs/SamplesPerCycle; +TsFPGA = 1/FPGAClkRate; + +%% Channelizer parameters + +% Number of channels, maximally decimated channelizer M/D=1 +nChan = 128; + +% Taps per band +nTapsPerBand = 12; + +% 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); + +% Number of frames out of channelzier +nFrames = nChan/SamplesPerCycle; + +% Frame size after serializing x2 +frameSize = SamplesPerCycle/2; + +%% Detection parameters + +% Moving average window length +movingAverageWindowLength = 64; + +% Moving average comparison offset +movingAverageCompareOffset = 32; + +% Threshold for ratio of current moving average to offset +thresholdScale = 500; +thresholdScaleDT = fixdt(1,18,-6); +thresholdScaleFi = fi(thresholdScale, thresholdScaleDT); + +%% Tx signal generator parameters + +% NCO accumulator word length +NCOAccumWL = 16; + +% NCO phase increment scale factor +NCOIncScale = Ts*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 width +pulseWidth = 8e-6; + +% Pulse start/end frequencies +pulseStartFreq = 1305e6; +pulseEndFreqOffset = 15e6; + +% Number of pulses +numPulses = 2; + +% Pulse repetition interval +PRI = 50e-6; + +% Output gain +pulseGenGain = 1; + +%% Capture parameters + +% Time to capture after a detection +captureDuration = 10e-6; +captureLength = round(captureDuration*chanBW); + +% Length of capture frame +% Contains I/Q data plus channel number and two words of timestamp +captureFrameLength = captureLength+3; + +% Max number of capture frames in a DMA packet +captureFramesPerPacket = 50; + +% Timeout to transfer a DMA packet if number of frames less than max +capturePacketTimeout = 1e-3; + +%% DMA parameters + +% DMA packet length +DMAPacketLength = captureFrameLength*captureFramesPerPacket; +DMAPacketSize = captureFrameLength*captureFramesPerPacket; + +% Number of DMA buffers +DMANumBuffers = 8; + +% DMA FIFO depth +DMAFIFODepth = 4096; + +%% Software parameters + +% Signal generator update rate +TsSW = 0.25; + +%% Simulation parameters + +% Sim run time +% stoptime = PRI*numPulses + 1e-3; +stoptime = PRI*captureFramesPerPacket + 1e-5; diff --git a/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/-fBNH4Vym_CdCwpwYWJRhBbuhK0d.xml b/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/-fBNH4Vym_CdCwpwYWJRhBbuhK0d.xml new file mode 100644 index 0000000..99772b4 --- /dev/null +++ b/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/-fBNH4Vym_CdCwpwYWJRhBbuhK0d.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/-fBNH4Vym_CdCwpwYWJRhBbuhK0p.xml b/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/-fBNH4Vym_CdCwpwYWJRhBbuhK0p.xml new file mode 100644 index 0000000..aaa3cc5 --- /dev/null +++ b/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/-fBNH4Vym_CdCwpwYWJRhBbuhK0p.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/ZmGHm4fO3sDsC61p0vEaNX3ZnB8d.xml b/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/ZmGHm4fO3sDsC61p0vEaNX3ZnB8d.xml new file mode 100644 index 0000000..99772b4 --- /dev/null +++ b/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/ZmGHm4fO3sDsC61p0vEaNX3ZnB8d.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/ZmGHm4fO3sDsC61p0vEaNX3ZnB8p.xml b/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/ZmGHm4fO3sDsC61p0vEaNX3ZnB8p.xml new file mode 100644 index 0000000..a4a7a81 --- /dev/null +++ b/resources/project/xNuMB6At47V-Cm15fF7d0FHblJo/ZmGHm4fO3sDsC61p0vEaNX3ZnB8p.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file