vivado dds IP核笔记

vivado dds IP核笔记

DDS IP核在vivado提供的GUI界面中,可以选择三种配置:
Phase Generator and SIN/COS LUT (DDS)
SIN/COS LUT only,
Phase Generator
这里记录一下DDS 的Phase Generator and SIN/COS LUT (DDS)与SIN/COS LUT only模式。
Phase Generator and SIN/COS LUT (DDS):
在IP核内部集成好相位累加器与sin/cos模块,只需要在GUI中配置好需要生成的频率即可,可选择单独输出sin,或cos,也可以两个曲线正交输出。
SIN/COS LUT only模式:
例化的IP核只有一个sin/cos模块,需要外部不断的输入累加的相位

输出频率计算

  1. Standard Mode of Operation
    输出频率fout,
    系统时钟fclk,
    相位累加量Δθ
    Bθn 相位位宽,
    在这里插入图片描述vivado dds IP核笔记_第1张图片
  2. Rasterized Mode of Operation
    vivado dds IP核笔记_第2张图片频率分辨率:
    对于标准模式频率分辨率计算公式为:
    在这里插入图片描述
always @ (posedge clk or posedge rst)
begin
    if (rst)
        phase_data <= 16'd0;
    else
        phase_data <= phase_data + fre_word;
end

dds_compiler_0 dds_i (
  .aclk(clk),                                // input wire aclk
  .aclken(1'b1),                            // input wire aclken
  .s_axis_phase_tvalid(1'b1),  // input wire s_axis_phase_tvalid
  .s_axis_phase_tdata(phase_data),    // input wire [15 : 0] s_axis_phase_tdata
  .m_axis_data_tvalid(),    // output wire m_axis_data_tvalid
  .m_axis_data_tdata(t_data)      // output wire [31 : 0] m_axis_data_tdata
);

最后有几点还没有搞明白,
在Implementation Tab 栏中
Phase Increment Programmability: Selects the means by which the PINC value is set.
° Fixed: PINC is fixed at generation time and cannot be changed at run-time. Fixed requires minimal resource.
° Programmable: PINC value can be changed at run-time using the CONFIG channel. This is recommended when the DDS frequency is to change between modes of operation.
° Streaming: PINC value is taken directly from the input PHASE channel. This is recommended when the PINC value has to change often, or for example when frequency modulation is required.
对于需要改变频率的使用还没有搞明白,暂时先使用手动相位累加器来实现吧

-------------------------7/27更新-------------------------
在使用Streaming模式配置生成调频信号时,如果输出的信号频率需要变化那么s_axis_phase_tvalid,要高有效s_axis_phase_tdata换算成输出频率的公式如下:vivado dds IP核笔记_第3张图片重要的事情说三遍
重要的事情说三遍
重要的事情说三遍
:注意在s_axis_phase_tdata发生变化时需要对IP核进行复位(arestn),不然无法产生调频信号。

你可能感兴趣的:(FPGA)