echo47 said:The 15/16 feedback provides the low-frequency gain.
By inspection of Figure 2, at steady-state: d(t) = c(t) + 15/16 * d(t)
That rearranges into: d(t) = 16 * c(t)
d(t) SXXXX.XXXXXXX <12,4,t>
d(t) * 1/1024 s.sssssSXXXXXXXXXXX <12,-6,t> 's' is an implied sign bit
+0.0625 + .000100000000000000 <18,0,u>
NCO control = .XXXXXXXXXXXXXXXXXX <18,0,u>
// [url]http://www.ie.u-ryukyu.ac.jp/~wada/design05/spec_e.html[/url]
module top (clk, fmin);
input clk;
input signed [7:0] fmin;
reg signed [7:0] ireg = 0;
reg signed [11:0] d = 0;
reg [17:0] nco = 0;
wire signed [7:0] ref;
reg signed [7:0] rom [0:1023];
integer n;
initial begin
for (n=0; n<1024; n=n+1)
rom[n] = $floor(127.499 * $sin(2 * 3.1415926535 / 1024 * n) + 0.5);
end
assign ref = rom[nco[17:8]];
always @ (posedge clk) begin
ireg <= fmin;
d <= ireg * ref / 128 + d * 15 / 16;
nco <= d * 2 + (1 << 18) / 16 + $signed(nco);
end
endmodule
d <= ireg * ref * 5 / 2048 + d * 49 / 50;
nco <= d * 41 / 64 + (1 << 18) / 50 + $signed(nco);
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?