|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
本帖最后由 苦寻爱 于 2012-7-13 15:34 编辑
用的aitera公司DE2的板子。因为没有ADC。所以只能将我要的数据存入到片内rom中。现在是我写的verilog程序。。
关键部分如下。
module lms(Clk,Enable,Error_out);
input
Clk,Enable;
output
signed [15:0] Error_out;(这个是经过自适应后的输出)
wire signed [15:0] Data_in,Desired_in;(前者是噪声的输入,后者是信号+噪声的输入)
reg [9:0] cnt = 10'd0;//0~1023
always @(posedge Clk)
begin
cnt <= cnt + 10'd1;
end
reg Reset = 1'b0;
always @(posedge Clk)
begin
if(cnt == 10'd1)
Reset <= 1'b0;
else if(cnt == 10'd2)
Reset <= 1'b1;
else if(cnt == 10'd3)
Reset <= 1'b0;
else
Reset <= Reset;
end (这一部分是做reset的功能)
reg [9:0] addra = 10'd0;
always @ (posedge Clk)
begin
if(Reset)
addra <= 10'd0;
else
addra <= addra + 10'd1;
end
noise rom2 (.clock(Clk),
.address(addra),
.q(Data_in)
); (这一部分是做噪声信号存入rom中,调用模块)
reg [9:0] addrb = 10'd0;
always @ (posedge Clk)
begin
if(Reset)
addrb <= 10'd0;
else
addrb <= addrb + 10'd1;
end
mix rom1 (.clock(Clk),
.address(addrb),
.q(Desired_in)
); (这一部分是做信号+噪声存入了rom中,调用模块提供输入波形)
……………………………………………………………………………………………………………………(剩下的是其余lms的算法,那些模块都没问题。)
经过上面我写的东西。。。。quartus爆出警告。Warning (332060): Node: Clk was determined to be a clock but was found without an associated clock assignment. (我已经将clk接了晶振的引脚了,但为什么说Clk被确定为一个钟,但是时没有发现一个关联的时钟赋值。)
核心警告。Critical Warning (332168): The following clock transfers have no clock uncertainty assignment. For more accurate results, apply clock uncertainty assignments or use the derive_clock_uncertainty command.
Critical Warning (332169): From altera_reserved_tck (Rise) to altera_reserved_tck (Rise) (setup and hold)
Critical Warning (332169): From altera_reserved_tck (Rise) to altera_reserved_tck (Fall) (setup and hold)
Critical Warning (332169): From altera_reserved_tck (Fall) to altera_reserved_tck (Fall) (setup and hold)
而且这个问题就是在写了。。。。。。rom模块调用后。出现的警告!这里的调用我写错了????????
求各位高手。帮忙看看额~~~~~~~不知道是不是我的代码写错了啊???????????还是怎么了???????? |
|