📄 usingaccelware_script.m
字号:
% AccelDSP 8.1.1 build 690 Production, compiled Apr 26 2006
%
% THIS IS UNPUBLISHED, LICENSED SOFTWARE THAT IS THE CONFIDENTIAL
% AND PROPRIETARY PROPERTY OF XILINX OR ITS LICENSORS
%
% Copyright(c) Xilinx, Inc., 2000-2006, All Rights Reserved.
% Reproduction or reuse, in any form, without the explicit written
% consent of Xilinx, Inc., is strictly prohibited.
clc;clear all;close all;
% Create the filter coefficients
NUMSAMPS = 1024*2;
NUMTAPS = 34;
BE = 0.25;
b = fir1(NUMTAPS-1,BE);
save b.txt -ascii -double b;
% Create the input stimulus
rand('state',0);
scale = 2*sqrt(12);
x = (rand(1,NUMSAMPS)-0.5)*scale;
%y = filter(Hd1,x);
% Set the Phase In frequency to 14 Mhz for the DDS
DDS_Frequency = 100;% MHz
DesiredFreq = 14; % MHz
PhaseIn = floor(DesiredFreq/DDS_Frequency*2^20);
for i = 1:length(x)
[y(i),valid(i),Sine(i)] = ddc(x(i),PhaseIn);
end
index = boolean(valid);
y = y(index);
% Generate power spectral density of the filter outputs
[Pout,Wout]=aw_psd(y,256,100e6);
[Pout2,Wout2]=aw_psd(Sine,1024,100e6);
% Plot the PSD Response
subplot(2,1,1);plot(Wout,10*log10(Pout),'r');title('DDC PSD Response')
subplot(2,1,2);plot(Wout2,10*log10(Pout2));title('DDS Sine Out')
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -