目录
1.算法仿真效果
vivado2019.2仿真结果如下:
2.verilog源码
%******************************************************************
%订阅用户可以获得任意一份完整代码,私信博主,留言文章链接和邮箱地址,
%一般第二天下午4点前会将完整程序发到邮箱中。
%******************************************************************
`timescale 1ns/1ns
module sinus_gen(
input clk ,
output reg signed [15:0] sinus
);
parameter SIZE = 1024;
reg [15:0] rom_memory [SIZE-1:0];
integer i;
initial begin
$readmemh("sine.mem", rom_memory); //File with the signal
i = 0;
end
//At every positive edge of the clock, output a sine wave sample.
always@(posedge clk)
be