<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > DDS直接數字合成4 - 插值

DDS直接數字合成4 - 插值

作者: 時(shí)間:2024-01-16 來(lái)源:EEPW編譯 收藏

現在,雖然相位累加器非常精確,但輸出受到查找表中條目數量有限的影響:從一個(gè)條目轉到下一個(gè)條目時(shí),輸出值會(huì )“跳躍”。 這對于低輸出頻率特別敏感,但也會(huì )影響高輸出頻率,這會(huì )在輸出頻譜中引入不需要的頻率。

本文引用地址:http://dyxdggzs.com/article/202401/454852.htm

我們將解決這個(gè)問(wèn)題。 為了便于理解,讓我們回到 15 位相位累加器。

// sine without linear interpolationreg [14:0] phase_acc;    // 15bitalways @(posedge clk) phase_acc <= phase_acc + 15'h1;sine_lookup my_sine(.clk(clk), .addr(phase_acc[14:4]), .value(sine_lookup_output));

上面的代碼每 16 個(gè)時(shí)鐘從一個(gè)查找表移動(dòng)到下一個(gè)查找表。 這使得輸出每 16 個(gè)時(shí)鐘“跳躍”一次。

改善這種情況的有效方法是使用相位累加器的最低 4 位(到目前為止未使用)在兩個(gè)連續的查找表條目之間進(jìn)行線(xiàn)性。 這很容易做到(使用兩個(gè)查找表而不是一個(gè)查找表)。

// sine with linear interpolationreg [14:0] phase_acc;always @(posedge clk) phase_acc <= phase_acc + 15'h1;// use two lookup tables to get two successive table valueswire [16:0] sine1_lv, sine2_lv;  sine_lookup my_sine1(.clk(clk), .addr(phase_acc[14:4]      ), .value(sine1_lv));sine_lookup my_sine2(.clk(clk), .addr(phase_acc[14:4]+11'h1), .value(sine2_lv));// now the 4 LSB bits from the phase accumulator need to be delayed// (to match the latency introduced by the lookup tables)reg [3:0] phase_LSB_delay1;  always @(posedge clk) phase_LSB_delay1 <= phase_LSB[3:0];reg [3:0] phase_LSB_delay2;  always @(posedge clk) phase_LSB_delay2 <= phase_LSB_delay1;reg [3:0] phase_LSB_delay3;  always @(posedge clk) phase_LSB_delay3 <= phase_LSB_delay2;// before we can use them to do the interpolationwire [4:0] sine1_mf = 5'h10 - phase_LSB_delay3;wire [3:0] sine2_mf = phase_LSB_delay3;reg [20:0] sine_p; always @(posedge clk) sine_p <= sine1_lv*sine1_mf + sine2_lv*sine2_mf;assign DAC_data_out = sine_p[20:11];

兩個(gè)查找表包含相同的值。 我們從一個(gè)值中提取一個(gè)值,從另一個(gè)值中提取它的相鄰值(“phase_acc+1”),這樣我們就可以在兩個(gè)值之間線(xiàn)性。

使我們能夠從 中獲得更好的分辨率,同時(shí)保持查找表大小合理。 我們的查找表創(chuàng )建具有 2048 個(gè)值的正弦函數。在每個(gè)值之間,我們插值 15 個(gè)點(diǎn),因此我們最終得到 2048*16=32768 個(gè)正弦點(diǎn),就像有更大的查找表一樣。

改進(jìn)的想法

  • 使用 32 位相位累加器覆蓋各種頻率(或查看 Saxo-Q 的 USB 控制的 32 位 示例)。

  • 減少查找表的要求(僅使用一個(gè),或使用迭代方法(如 CORDIC))。

  • 使用 sin(x)/x 濾波器而不是線(xiàn)性插值。

  • 使用抖動(dòng)來(lái)提高DAC分辨率。

實(shí)驗輪到你來(lái)了!

上一篇:DDS直接數字合成3 - 相位累加器

下一篇:DDS直接數字合成(總)



關(guān)鍵詞: FPGA DDS 插值

評論


相關(guān)推薦

技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>